id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_blender/artists/__init__.py
import compas_blender from compas.plugins import plugin from compas.artists import Artist from compas.geometry import Box from compas.geometry import Capsule from compas.geometry import Circle from compas.geometry import Cone from compas.geometry import Curve from compas.geometry import Cylinder from compas.geometry ...
PypiClean
/CatLearn-0.6.2.tar.gz/CatLearn-0.6.2/catlearn/regression/gaussian_process.py
from __future__ import absolute_import from __future__ import division import numpy as np from scipy.optimize import minimize, basinhopping from collections import defaultdict import functools import warnings from .gpfunctions.log_marginal_likelihood import log_marginal_likelihood from .gpfunctions.covariance import g...
PypiClean
/LARRY_dataset-0.0.2rc0-py3-none-any.whl/larry/_utils/_multi_fated_lineage_prediction_results.py
from ._abc_parse import ABCParse import pandas as pd import sklearn class MultifatedLineagePredictionResults(ABCParse): def __init__(self, threshold=0.3): """threshold: accuracy threshold for which we decide it counts as truly labeled""" self.__parse__(locals(), private=["threshold"]) se...
PypiClean
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/demo.py
from subprocess import check_call, DEVNULL from shutil import copy, copytree import os from os.path import abspath from sys import executable as python from pathlib import Path my_repo = Path(__file__).absolute().parent def run(): # uses fixed paths; worth it for the sake of demonstration # assumes we're in ...
PypiClean
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/tweak/shell/command.py
from ... import __version__, __legal__ from ...core.util import maybe, listof from ...core.context import context from ...core.adapter import Adapter, adapt, adapt_many, call from ...core.error import PermissionError, Error, Mark, recognize_guard from ...core.domain import (Domain, BooleanDomain, NumberDomain, DateTi...
PypiClean
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/src/illuminapairedend.py
from obitools import NucSequence from obitools.options import getOptionManager, allEntryIterator from obitools.align import QSolexaReverseAssemble from obitools.align import QSolexaRightReverseAssemble from obitools.tools._solexapairend import buildConsensus from obitools.format.options import addOutputFormatOption,\ ...
PypiClean
/DendroPy-4.6.1.tar.gz/DendroPy-4.6.1/src/dendropy/utility/bibtex.py
############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this work or any portion there...
PypiClean
/AsyncOpenStackClient-0.9.0.tar.gz/AsyncOpenStackClient-0.9.0/src/asyncopenstackclient/auth.py
import aiohttp import os from dateutil import parser from time import time class AuthModel: def __init__(self): self._auth_url = None self._username = None self._password = None self._user_domain_name = None self._project_domain_name = None self._project_id = None ...
PypiClean
/FlaskSamlSP-22.8.28.tar.gz/FlaskSamlSP-22.8.28/src/FlaskSaml/FlaskSP.py
import time from urllib.parse import urlencode, parse_qs from cryptography.hazmat.backends import default_backend from cryptography.x509 import load_pem_x509_certificate from minisaml.response import validate_response from minisaml.request import get_request_redirect_url from flask import ( Blueprint, ...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-ms.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
/BiolinkMG-0.3.0.tar.gz/BiolinkMG-0.3.0/metamodel/generators/golrgen.py
import os from typing import Union, TextIO, List, Optional import click from dataclasses import dataclass from metamodel.utils.generator import Generator from metamodel.metamodel import SchemaDefinition, ClassDefinition, SlotDefinition from metamodel.utils.metamodelcore import empty_list from metamodel.utils.formatut...
PypiClean
/EHRcorral-0.0.3.tar.gz/EHRcorral-0.0.3/CONTRIBUTING.rst
============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/nsh87/ehrcorral/issue...
PypiClean
/FEADRE_AI-1.0.7.tar.gz/FEADRE_AI-1.0.7/FEADRE_AI/ai/object_detection/boxes/f_boxes.py
import math import torch import numpy as np def empty_bboxes(bboxs): if isinstance(bboxs, np.ndarray): bboxs_copy = np.empty_like(bboxs, dtype=np.float) elif isinstance(bboxs, torch.Tensor): device = bboxs.device bboxs_copy = torch.empty_like(bboxs, device=device, dtype=torch.float) ...
PypiClean
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/client/auth.py
import getpass import inspect import os import sys import typing import warnings from .. import utils, helpers, errors, password as pwd_mod from ..tl import types, functions, custom from .._updates import SessionState if typing.TYPE_CHECKING: from .telegramclient import TelegramClient class AuthMethods: # ...
PypiClean
/OASYS1-CRYSTALPY-1.33.tar.gz/OASYS1-CRYSTALPY-1.33/orangecontrib/crystalpy/widgets/elements/Alignment.py
import numpy as np import sys import os import xraylib from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import widget import orangecanvas.resources as resources from crystalpy.util.Vector import Vector from crystalpy.util.PolarizedPhotonBunch import PolarizedPhotonBunch class...
PypiClean
/FeinCMS-23.8.0.tar.gz/FeinCMS-23.8.0/feincms/content/image/models.py
import os from django.db import models from django.utils.translation import gettext_lazy as _ from feincms import settings from feincms.templatetags import feincms_thumbnail from feincms.utils.tuple import AutoRenderTuple class ImageContent(models.Model): # You should probably use # `feincms.content.mediali...
PypiClean
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/scrape/pub/rsc.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import re from bs4 import UnicodeDammit from lxml.etree import fromstring from lxml.html import HTMLParser, Element import six from ...text.processors imp...
PypiClean
/GWAS_benchmark-0.1.3.zip/GWAS_benchmark-0.1.3/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
/Docassemble-Flask-User-0.6.28.tar.gz/Docassemble-Flask-User-0.6.28/docassemble_flask_user/translations.py
from flask import _request_ctx_stack, current_app # To avoid requiring the Flask-Babel, Babel and speaklater packages, # we check if the app has initialized Flask-Babel or not def get_translations(): # If there is no context: return None ctx = _request_ctx_stack.top if not ctx: return None # ...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/models/functions/text.py
from django.db import NotSupportedError from django.db.models.expressions import Func, Value from django.db.models.fields import CharField, IntegerField, TextField from django.db.models.functions import Cast, Coalesce from django.db.models.lookups import Transform class MySQLSHA2Mixin: def as_mysql(self, compiler...
PypiClean
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/controller/controllers/AufofocusController.py
import time import numpy as np from time import perf_counter import scipy.ndimage as ndi from scipy.ndimage.filters import laplace from imswitch.imcommon.framework import Thread, Timer from imswitch.imcommon.model import initLogger, APIExport from ..basecontrollers import ImConWidgetController # global axis for Z-po...
PypiClean
/Newsroom-1.0-py3-none-any.whl/newsroom/users/views.py
import flask from newsroom.utils import query_resource, find_one from bson import ObjectId from werkzeug.exceptions import BadRequest, NotFound from newsroom.users.forms import UserForm from superdesk import get_resource_service from newsroom.users import blueprint from flask_babel import gettext from newsroom.notifica...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/combotreebox.py
import wx __all__ = ['ComboTreeBox'] # Export only the ComboTreeBox widget # --------------------------------------------------------------------------- class IterableTreeCtrl(wx.TreeCtrl): """ TreeCtrl is the same as :class:`TreeCtrl`, with a few convenience methods added for easier navigation of item...
PypiClean
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/ann/README.md
# 集成Faiss/Milvus ``` from docarray import Document, DocumentArray import numpy as np n_dim = 3 metric = 'Euclidean' # initialize a DocumentArray with ANNLiter Document Store da = DocumentArray( storage='annlite', config={'n_dim': n_dim, 'columns': [('price', 'float'), ('cat', 'str')], 'metric': metric}, ) d...
PypiClean
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/Energon_Prometheus_exporter-main/models/jetson_agx_orin.py
import utils import time import constants from models.general_model import GeneralModel # Jetson Nano Dev Kit Model # author: @MatteoMendula # date: 2023-04-29 class JetsonAgxOrin(GeneralModel): def __init__(self): super().__init__() def set_energy_metrics(self): in_gpu_power = util...
PypiClean
/BittyTax-0.5.1.tar.gz/BittyTax-0.5.1/src/bittytax/conv/parsers/binance.py
import re import sys from decimal import Decimal from colorama import Fore from ...config import config from ..dataparser import DataParser from ..exceptions import DataFilenameError, UnexpectedTradingPairError, UnexpectedTypeError from ..out_record import TransactionOutRecord PRECISION = Decimal("0." + "0" * 8) W...
PypiClean
/Markdown_Tracker-0.1.1-py3-none-any.whl/mdt/mdt_stat.py
from mdt.mdt_init import * #P_TAG = r"\#([\w\:\,\_]+)" #P_TAG = r"\@\w+(?:\([-\w]\))?" P_TAG = r"\@\S+" P_TAG2 = r"\@(\w+)\(([-\w]+)\)?" def add_stat(tbl, stats, sign = 1): tbl_stat = pd.concat([tbl.apply(stat_count,axis=1), tbl.apply(stat_journal,axis=1)], axis=1) #pdb.set_trace() return pd.concat([tbl, s...
PypiClean
/AEMET_OpenData-0.4.4-py3-none-any.whl/aemet_opendata/interface.py
import asyncio from dataclasses import dataclass, field import logging from typing import Any, cast from aiohttp import ClientError, ClientSession from aiohttp.client_reqrep import ClientResponse import geopy.distance from geopy.distance import Distance from .const import ( AEMET_ATTR_DATA, AEMET_ATTR_STATE,...
PypiClean
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/kitchen_sink/static/ks/ckeditor/plugins/specialchar/dialogs/lang/tr.js
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("specialchar","tr",{euro:"Euro işareti",lsquo:"Sol tek tırnak işareti",rsquo:"Sağ tek tırnak işareti",ldquo:"Sol çift tırnak işareti",rdquo:"Sağ çift...
PypiClean
/My_Server_Student-0.0.1.tar.gz/My_Server_Student-0.0.1/server/server/remove_user.py
from PyQt5.QtWidgets import QDialog, QLabel, QComboBox, QPushButton, QApplication from PyQt5.QtCore import Qt class DelUserDialog(QDialog): """Диалог выбора контакта для удаления""" def __init__(self, database, server): super().__init__() self.database = database self.server = server ...
PypiClean
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/lexer/lines/_test/offside.py
from logging import basicConfig, DEBUG from unittest import TestCase from lepl.lexer.matchers import Token from lepl.matchers.combine import Or from lepl.matchers.core import Delayed from lepl.matchers.derived import Letter, Digit from lepl.matchers.monitor import Trace from lepl.lexer.lines.matchers import Block, Lin...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dijit/_editor/plugins/EnterKeyHandling.js
define("dijit/_editor/plugins/EnterKeyHandling",["dojo/_base/declare","dojo/dom-construct","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window","dojo/window","../_Plugin","../RichText","../range","../selection"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){ return _1("dijit._editor.p...
PypiClean
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/crypto/mtproto.py
from hashlib import sha256 from io import BytesIO from os import urandom from pyrogram.errors import SecurityCheckMismatch from pyrogram.raw.core import Message, Long from . import aes def kdf(auth_key: bytes, msg_key: bytes, outgoing: bool) -> tuple: # https://core.telegram.org/mtproto/description#defining-aes...
PypiClean
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Pipelines/BaseTrainer.py
from typing import Optional from sys import stdout from DeepPhysX.Core.Pipelines.BasePipeline import BasePipeline from DeepPhysX.Core.Manager.Manager import Manager from DeepPhysX.Core.Network.BaseNetworkConfig import BaseNetworkConfig from DeepPhysX.Core.Dataset.BaseDatasetConfig import BaseDatasetConfig from DeepPhy...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/postgres/forms/array.py
import copy from itertools import chain from django import forms from django.contrib.postgres.validators import ( ArrayMaxLengthValidator, ArrayMinLengthValidator, ) from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from ..utils import prefix_validation_...
PypiClean
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/types/messages_and_media/audio.py
from datetime import datetime from typing import List import pyrogram from pyrogram import raw, utils from pyrogram import types from pyrogram.file_id import FileId, FileType, FileUniqueId, FileUniqueType from ..object import Object class Audio(Object): """An audio file to be treated as music by the Telegram cl...
PypiClean
/MTGProxyPrinter-0.25.0.tar.gz/MTGProxyPrinter-0.25.0/mtg_proxy_printer/document_controller/card_actions.py
# 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 that it will be useful, # bu...
PypiClean
/MozPhab-1.4.3-py3-none-any.whl/mozphab/logger.py
import calendar import contextlib import logging import logging.handlers import os import re import sys import time from glob import glob from mozphab import environment from colorama import just_fix_windows_console logger = logging.getLogger("moz-phab") LOG_MAX_SIZE = 1024 * 1024 * 50 LOG_BACKUPS = 5 _handler...
PypiClean
/Impyccable-1.1.1.tar.gz/Impyccable-1.1.1/impyccable/generators.py
__author__ = 'Taylor "Nekroze" Lawson' __email__ = 'nekroze@eturnilnetwork.com' import random from string import printable import sys from types import GeneratorType # Constants MIN_INT = -sys.maxsize - 1 MAX_INT = sys.maxsize MIN_FLOAT = -1e7 MAX_FLOAT = 1e7 LIST_LEN = 30 # Basic Types def Value(val): """ ...
PypiClean
/Altair%20Smartworks%20SDK-0.0.1.tar.gz/Altair Smartworks SDK-0.0.1/openapi_client/model/thing_list_response.py
import re # noqa: F401 import sys # noqa: F401 from openapi_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, ...
PypiClean
/django-chuck-0.2.3.tar.gz/django-chuck/modules/feincms/project/static/scripts/libs/tiny_mce/plugins/autoresize/editor_plugin_src.js
(function() { /** * Auto Resize * * This plugin automatically resizes the content area to fit its content height. * It will retain a minimum height, which is the height of the content area when * it's initialized. */ tinymce.create('tinymce.plugins.AutoResizePlugin', { /** * Initializes the plugin, t...
PypiClean
/NehorayRapid1-0.0.1-py3-none-any.whl/mmedit/core/evaluation/eval_hooks.py
import os.path as osp from mmcv.runner import Hook from torch.utils.data import DataLoader class EvalIterHook(Hook): """Non-Distributed evaluation hook for iteration-based runner. This hook will regularly perform evaluation in a given interval when performing in non-distributed environment. Args: ...
PypiClean
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/doc/table.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from collections import defaultdict from ..model import Compound, ModelList from ..parse.table import CompoundHeadingParser, CompoundCellParser, UvvisAbsHe...
PypiClean
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/acorn-node/lib/dynamic-import/index.js
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.DynamicImportKey = undefined; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; ...
PypiClean
/GQCConstraints-1.1.1-py3-none-any.whl/GQCC/SpinUnresolvedConstraints/GHF.py
import gqcpy import numpy as np import numpy.random as rand import scipy from GQCC.Optimization.SpinUnresolvedOptimizer import SpinUnresolvedOptimizer class GHF(SpinUnresolvedOptimizer): """ A constructor that sets up everything needed for constrained GHF calculations. :param molecule: ...
PypiClean
/ConceptNet-5.7.0.tar.gz/ConceptNet-5.7.0/conceptnet5/readers/verbosity.py
import re from collections import defaultdict from conceptnet5.edges import make_edge from conceptnet5.formats.msgpack_stream import MsgpackStreamWriter from conceptnet5.nodes import standardized_concept_uri from conceptnet5.uri import Licenses from conceptnet5.util.sounds_like import sounds_like_score # If any word ...
PypiClean
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/hydrolysis/src/ast-utils/element-finder.ts
'use strict'; import * as estraverse from 'estraverse'; import * as esutil from './esutil'; import * as analyzeProperties from './analyze-properties'; import * as astValue from './ast-value'; import {declarationPropertyHandlers, PropertyHandlers} from './declaration-property-handlers'; import {ElementDescriptor, Prope...
PypiClean
/Eskapade_Spark-1.0.0-py3-none-any.whl/eskapadespark/tutorials/esk609_map_df_groups.py
from eskapade import process_manager, ConfigObject, DataStore, Chain from eskapade.logger import Logger from eskapadespark import SparkManager, SparkDfConverter, RddGroupMapper logger = Logger() logger.debug('Now parsing configuration file esk609_map_df_groups') ######################################################...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py
from typing import Dict, Optional import pandas as pd import transformers from huggingface_hub import HfApi from mindsdb.integrations.handlers.huggingface_handler.settings import FINETUNE_MAP from mindsdb.integrations.libs.base import BaseMLEngine from mindsdb.utilities import log class HuggingFaceHandler(BaseMLEng...
PypiClean
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cc.py
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons.Tool import SCons.Defaults import SCons.Util CSuffixes = ['.c', '.m'] if not SCons.Util.case_sensitive_suffixes('.c', '.C'): CSuffixes.append('.C') def add_common_cc_variables(env): """ Add underlying common "C compiler" variable...
PypiClean
/LumberMill-0.9.5.7-py3-none-any.whl/lumbermill/BaseThreadedModule.py
import threading import lumbermill.BaseModule as BaseModule # Conditional imports for python2/3 try: import Queue as queue except ImportError: import queue class BaseThreadedModule(BaseModule.BaseModule, threading.Thread): """ Base class for all lumbermill modules. In most cases this is the class to ...
PypiClean
/Flask%20of%20Cinema-1.0.0.tar.gz/Flask of Cinema-1.0.0/static/js/modal.js
(function($, anim) { 'use strict'; let _defaults = { opacity: 0.5, inDuration: 250, outDuration: 250, onOpenStart: null, onOpenEnd: null, onCloseStart: null, onCloseEnd: null, preventScrolling: true, dismissible: true, startingTop: '4%', endingTop: '10%' }; /** *...
PypiClean
/CoAPthon-4.0.2.tar.gz/CoAPthon-4.0.2/coapthon/layers/observelayer.py
import logging import time from coapthon import defines __author__ = 'Giacomo Tanganelli' logger = logging.getLogger(__name__) class ObserveItem(object): def __init__(self, timestamp, non_counter, allowed, transaction): """ Data structure for the Observe option :param timestamp: the tim...
PypiClean
/GameOfLife-0.1.3-py3-none-any.whl/GameOfLife-0.1.3.data/scripts/PGameOfLife.py
import os import sys import time import math import pygame from pygame.gfxdraw import pixel from pygame.locals import * from GameOfLife import World, Cell, Patterns _SurfaceDepth = 32 class ColorCell(Cell): ''' ''' @property def color(self): ''' Cell foreground color. '...
PypiClean
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/14985.666a84d1ea8d131bb125.min.js
(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[14985],{14985:function(e,n,s){!function(e){"use strict"; //! moment.js locale configuration function n(e,n,s,a){var t=e+" ";switch(s){case"s":return n||a?"nekaj sekund":"nekaj sekundami";case"ss":return t+=1===e?n?"sekundo"...
PypiClean
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/addon/hint/show-hint.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...
PypiClean
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/ed_basestc.py
__author__ = "Cody Precord <cprecord@editra.org>" __svnid__ = "$Id: ed_basestc.py 72105 2012-07-15 15:12:05Z CJP $" __revision__ = "$Revision: 72105 $" #-----------------------------------------------------------------------------# # Imports import wx import wx.stc # Editra Imports import ed_glob import ed_style impo...
PypiClean
/Kotti-2.0.9.tar.gz/Kotti-2.0.9/kotti/fanstatic.py
from typing import List from typing import Optional from typing import Union from fanstatic import Group from fanstatic import Library from fanstatic import Resource from js.angular import angular from js.bootstrap import bootstrap_css from js.bootstrap import bootstrap_js from js.fineuploader import fineuploader from...
PypiClean
/Ambit_Stochastics-1.0.6-py3-none-any.whl/ambit_stochastics/simple_ambit_field.py
################################################################### #imports from collections import Counter from itertools import chain from scipy.optimize import fsolve from scipy.integrate import quad import numpy as np import math import time #from numba import njit from .helpers.input_checks import ch...
PypiClean
/CondConfigParser-1.0.5.tar.gz/CondConfigParser-1.0.5/doc/internals/lexer.rst
The :mod:`~condconfigparser.lexer` submodule -------------------------------------------- .. warning:: The functions and methods listed in this section are implementation details of CondConfigParser. **Do not use them in your programs** if you rely on API stability, as they are likely to change in incompatible ...
PypiClean
/Aston-0.7.1.tar.gz/Aston-0.7.1/aston/peak/peak_models.py
import inspect from functools import wraps import numpy as np from numpy import exp, sqrt, abs, log from scipy.special import erfc, i1, gamma # These functions allow us to use commonsense notation # in labelling parameter bounds. The sqrt is to allow # the bounded parameter to be multiplied without fear of it # round...
PypiClean
/NlpToolkit-MorphologicalDisambiguation-1.0.16.tar.gz/NlpToolkit-MorphologicalDisambiguation-1.0.16/MorphologicalDisambiguation/RootFirstDisambiguation.py
from Dictionary.Word import Word from MorphologicalAnalysis.FsmParse import FsmParse from MorphologicalAnalysis.FsmParseList import FsmParseList from NGram.LaplaceSmoothing import LaplaceSmoothing from NGram.NGram import NGram from DisambiguationCorpus.DisambiguatedWord import DisambiguatedWord from DisambiguationCorp...
PypiClean
/ISPIP-1.13.tar.gz/ISPIP-1.13/ispip/ispip.py
import os from .argscontainer import ArgsContainer from .cli_interface import userinterface import pandas as pd from .postprocess import postprocess from .crossvalidation import hyperparamtertuning_and_crossvalidation from .generate import generate from .predict import predict from .graphing import roc_viz, pr_viz, tre...
PypiClean
/GenMotion-0.0.4-py3-none-any.whl/genmotion/algorithm/action_conditioned/datasets/ntu13.py
import os import numpy as np import joblib import codecs as cs from .dataset import Dataset # action2motion_joints = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 21, 24, 38] # change 0 and 8 action2motion_joints = [8, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 21, 24, 38] class NTU13(Dataset): datan...
PypiClean
/Kamaelia-0.6.0.tar.gz/Kamaelia-0.6.0/Axon/util.py
from AxonExceptions import invalidComponentInterface import sets #"""This sets the system into production moe which means that many exception could be suppressed to allow the system to keep running. Test all code with this set to false so that you are alerted to errors""" production=False def logError(someException,...
PypiClean
/Figures-0.4.4-py3-none-any.whl/figures/enrollment.py
from figures.compat import StudentModule from figures.models import EnrollmentData def student_modules_for_enrollment(enrollment): """Return an enrollment's StudentModule records, if they exist This function exists because edx-platform does not have a model relationship between `CourseEnrollment` and `St...
PypiClean
/crowdtruth-2.1.tar.gz/crowdtruth-2.1/crowdtruth/models/metrics.py
import logging import math from collections import Counter import numpy as np import pandas as pd SMALL_NUMBER_CONST = 0.00000001 class Metrics(): """ Computes and applies the CrowdTruth metrics for evaluating units, workers and annotations. """ # Unit Quality Score @staticmethod def unit_q...
PypiClean
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/pipelines/variantPipeline.sh
set -e #Written by Brian Bushnell #Last updated January 29, 2020 #This script is designed to preprocess and map data for variation calling of 2x150bp reads from Illumina HiSeq 2500. #Some numbers and steps may need adjustment for different data types or file paths. #The commands assume single-ended reads, or paired r...
PypiClean
/Natasy-0.0.1.tar.gz/Natasy-0.0.1/src/natasy/optimization.py
import numpy as np import time import logging from tqdm import tqdm logger = logging.getLogger(__name__) fr = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s') sh = logging.StreamHandler() # sh.setFormatter(fr) logger.addHandler(sh) logger.setLevel(logging.DEBUG) logger2 = logging.getLogger('other') file_ha...
PypiClean
/GitPython-3.1.34-py3-none-any.whl/git/repo/base.py
from __future__ import annotations import logging import os import re import shlex import warnings from pathlib import Path from gitdb.db.loose import LooseObjectDB from gitdb.exc import BadObject from git.cmd import Git, handle_process_output from git.compat import ( defenc, safe_decode, is_win, ) from...
PypiClean
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-fileinput/js/locales/gl.js
(function ($) { "use strict"; $.fn.fileinputLocales['gl'] = { fileSingle: 'arquivo', filePlural: 'arquivos', browseLabel: 'Examinar &hellip;', removeLabel: 'Quitar', removeTitle: 'Quitar aquivos seleccionados', cancelLabel: 'Cancelar', cancelTitle: 'Abort...
PypiClean
/Nodes-1.2.tar.gz/Nodes-1.2/rfNEAT/visualize.py
# This file is part of Nodes. # # Nodes 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. # # Nodes is distributed in the hope that it ...
PypiClean
/Expross-1.1.2.tar.gz/Expross-1.1.2/expross/routes.py
from expross.errors import NoRouteName, NoFunctionSpecified from expross.resource import Resource from typing import Callable class Route(Resource): """This is a router service used for every individual route Args: route (str): Route to be checked every request methods (list, optional): A lis...
PypiClean
/MetricTool-0.1.5.tar.gz/MetricTool-0.1.5/MetricTools/Cyclomatic.py
# 源码文件模型 class FileUnit: def __init__(self) -> None: self.functions = {} self.cur_fun_name = '' self.cur_fun_complexity = 0 # 访问函数进入 # 每一个节点都有两个动作,节点访问进入、节点访问退出 def function_enter(self, fun_name, start_line, start_col, end_line, end_col): self.cur_fun_name = F'''{f...
PypiClean
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/miscutils/ScanFiles.py
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2011-2013, Graham Klyne, University of Oxford" __license__ = "MIT (http://opensource.org/licenses/MIT)" from os.path import join, isdi...
PypiClean
/BNIAJFI_VitalSigns-0.0.13.tar.gz/BNIAJFI_VitalSigns-0.0.13/CONTRIBUTING.md
# How to contribute ## How to get started Before anything else, please install the git hooks that run automatic scripts during each commit and merge to strip the notebooks of superfluous metadata (and avoid merge conflicts). After cloning the repository, run the following command inside it: ``` nbdev_install_git_hook...
PypiClean
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/traced_module/module_tracer.py
import collections from .. import Tensor from .. import functional as F from ..core.tensor.array_method import ArrayMethodMixin from ..module import Module from ..module.qat import QATModule from .checker import TracedModuleChecker _active_module_tracer = None BUILTIN_ARRAY_METHOD = [ "__lt__", "__le__", ...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/lib/js/text.js
define, window, process, Packages, java, location, Components, FileUtils */ define(['module'], function (module) { 'use strict'; var text, fs, Cc, Ci, xpcIsWindows, progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'], xmlRegExp = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)...
PypiClean
/Floppi-Music-0.1.tar.gz/Floppi-Music-0.1/floppi/cmds.py
import argparse from sys import stderr import pkg_resources from floppi.music import get_music_parser from floppi.drive import MusicalFloppyEngine from floppi.rpi import GPIO from floppi.config import DRIVES _BANNER = """Copyright © 2013, 2016 Dominik George <nik@naturalnet.de> Copyright © 2013 Eike Tim ...
PypiClean
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/prototypes/nw/ui/admin/home.js
const sla_doc = '<div class="MuiTypography-root jss4" style="color: rgba(0, 0, 0, 0.66)">' + '<div style="text-align:center">' + '<h2>Welcome to API Logic Server - Sample</h2>' + '</div><br>' + '<h3><a class="custom" style="color: #3f51b5;" rel="nofollow" href="https://apilogicserver.github.io/Docs...
PypiClean
/BWP-0.7.0.tar.gz/BWP-0.7.0/bwp/contrib/devices/drivers/ICPDAS/dcon.py
import serial import time from django.utils.translation import ugettext_lazy as _ from bwp.contrib.devices.exceptions import DriverError from .helpers import string2bits, int2hex from . import conf DEFAULT_PORT = conf.DEFAULT_PORT DEFAULT_BOD = conf.DEFAULT_BOD MIN_TIMEOUT = conf.MIN_TIMEOUT CR = chr(0x0D) class ...
PypiClean
/LAMDA-SSL-1.0.2.tar.gz/LAMDA-SSL-1.0.2/LAMDA_SSL/Algorithm/Classification/FixMatch.py
import copy from LAMDA_SSL.Base.InductiveEstimator import InductiveEstimator from LAMDA_SSL.Base.DeepModelMixin import DeepModelMixin from sklearn.base import ClassifierMixin import LAMDA_SSL.Config.FixMatch as config from LAMDA_SSL.Loss.Cross_Entropy import Cross_Entropy from LAMDA_SSL.Loss.Semi_Supervised_Loss import...
PypiClean
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/oldanki/cards.py
__docformat__ = 'restructuredtext' import time, sys, math, random from oldanki.db import * from oldanki.models import CardModel, Model, FieldModel, formatQA from oldanki.facts import Fact, factsTable, Field from oldanki.utils import parseTags, findTag, stripHTML, genID, hexifyID from oldanki.media import updateMediaCo...
PypiClean
/KnapKings-0.0.1-py3-none-any.whl/runKnap.py
import Knapsack as k # ---------------------------- CMD_LINE = True # set True for cmd line interaction. otherwise modify globals below # ---------------------------- ENTRIES = 1 # sport BASK = True BASE = False # contest websites FD = True # FanDuel DK = True # DraftKings CAP = False # Captain Showdown MULTI = ...
PypiClean
/HolmesIV-2021.9.8a1.tar.gz/HolmesIV-2021.9.8a1/mycroft/client/text/text_client.py
import sys import io from math import ceil import xdg.BaseDirectory from mycroft.client.text.gui_server import start_qml_gui from mycroft.tts import TTS import os import os.path import time import curses import textwrap import json import mycroft.version from threading import Thread, Lock from mycroft.messagebus.cli...
PypiClean
/Hyperstatic-0.2.0-cp38-cp38-win_amd64.whl/hyperstatic/core/fe_model/meta/plates/TMQ copy/__init__.py
import os import sys import numpy as np import sympy as syp from sympy.utilities.autowrap import autowrap from hyperstatic.core.fe_model.meta.interpolate import Lagrange from hyperstatic.core.fe_model.meta.jacobi import J2D from hyperstatic.core.fe_model.meta.operator import operator_dot from hyperstatic.core.fe_model...
PypiClean
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/indicator/atr.py
import pandas as pd import numpy as np from ultron.ump.core.helper import pd_ewm_mean from ultron.kdutils import scaler as scaler_util from ultron.ump.indicator.base import g_calc_type, ECalcType def _calc_atr_from_ta(high, low, close, time_period=14): """ 使用talib计算atr,即透传talib.ATR计算结果 :param high: 最高价格序列...
PypiClean
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/grid/_Scroller.js
if(!dojo._hasResource["dojox.grid._Scroller"]){ dojo._hasResource["dojox.grid._Scroller"]=true; dojo.provide("dojox.grid._Scroller"); (function(){ var _1=function(_2){ var i=0,n,p=_2.parentNode; while((n=p.childNodes[i++])){ if(n==_2){ return i-1; } } return -1; }; var _3=function(_4){ if(!_4){ return; } var _5=functio...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/umd/locale/pt.js
(function (global, factory) { if (typeof define === "function" && define.amd) { define('element/locale/pt', ['module', 'exports'], factory); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(...
PypiClean
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Armadillo/FC/prediction.py
import os import sys from numpy import multiply # Sofa related imports import Sofa.Gui # DeepPhysX related imports from DeepPhysX.Core.Database.BaseDatabaseConfig import BaseDatabaseConfig from DeepPhysX.Core.Pipelines.BasePrediction import BasePrediction from DeepPhysX.Sofa.Environment.SofaEnvironmentConfig import S...
PypiClean
/NumFmt-0.0.0.post0.tar.gz/NumFmt-0.0.0.post0/numfmt/scistr/calc.py
import typing as _tp import itertools import math from .. import utils from . import fracs from . import ieee754 from ..intstr import math as intstr_math def sci_exp(base: int, x: float): x = abs(x) if x < 1: if x == 0.0: e = 0 else: e = math.log(1 / x, base) e = -math.ceil(e) else: e = math.log(x, ...
PypiClean
/DACBench-0.2.0.tar.gz/DACBench-0.2.0/dacbench/logger.py
import json from abc import ABCMeta, abstractmethod from collections import ChainMap, defaultdict from datetime import datetime from functools import reduce from itertools import chain from numbers import Number from pathlib import Path from typing import Any, Callable, Dict, Iterable, List, Tuple, Union import numpy ...
PypiClean
/CryptoDataHub-0.10.0.tar.gz/CryptoDataHub-0.10.0/cryptodatahub/common/key.py
import abc import hashlib import base64 import datetime import os from collections import OrderedDict import six import asn1crypto.keys import asn1crypto.pem import asn1crypto.x509 import attr from cryptodatahub.common.algorithm import Authentication, Hash, Signature from cryptodatahub.common.utils import bytes_to_...
PypiClean
/OASYS1-1.2.130.tar.gz/OASYS1-1.2.130/oasys/util/custom_distribution.py
import numpy class CustomDistribution(object): """ draws samples from a one dimensional probability distribution, by means of inversion of a discrete inverstion of a cumulative density function the pdf can be sorted first to prevent numerical error in the cumulative sum this is set as default; for...
PypiClean
/Flask-Discord-0.1.69.tar.gz/Flask-Discord-0.1.69/flask_discord/models/user.py
from .. import configs from .guild import Guild from .. import exceptions from .base import DiscordModelsBase from .connections import UserConnection from flask import current_app, session class User(DiscordModelsBase): """Class representing Discord User. Operations ---------- x == y Check...
PypiClean
/InPynamoDB-4.1.3-py3-none-any.whl/inpynamodb/connection/base.py
import logging from pynamodb.connection.util import pythonic from pynamodb.exceptions import TableError, TableDoesNotExist, DeleteError, UpdateError, PutError, TransactWriteError, \ TransactGetError, GetError, ScanError, QueryError import logging import uuid import aiobotocore import botocore.client from async_...
PypiClean
/Face_Detector_shu244-0.1.3-py3-none-any.whl/face_detector/models.py
from __future__ import division import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from face_detector.utils.parse_config import * from face_detector.utils.utils import build_targets, to_cpu, non_max_suppression def create_modules(module_defs): ...
PypiClean
/CC-Adsorber-0.1.2.tar.gz/CC-Adsorber-0.1.2/adsorber/utilities.py
import typing as typ if typ.TYPE_CHECKING: from adsorber.objects.asv import AdsorbateSiteVector #External imports import pymatgen as pmg # type: ignore from pymatgen.io.ase import AseAtomsAdaptor # type: ignore from pymatgen.c...
PypiClean
/BlockFiRates-0.5.0-py3-none-any.whl/blockfirates/client.py
import cloudscraper from functools import lru_cache import itertools import json class BlockFiRates: def __init__(self) -> None: pass __RATES_URL = "https://blockfi.com/page-data/rates/page-data.json" @lru_cache(None) def get_all_rates(self) -> list: scraper = cloudscraper.create_scr...
PypiClean
/MQDQParser-0.6.2-py3-none-any.whl/mqdq/elegy.py
from mqdq import line_analyzer as la from mqdq import rhyme_classes import pandas as pd import scipy as sp import copy def metre_vectors(bab): """Take a Babbler for an elegiac work and return a Pandas Dataframe containing the metrical features. The features are broadly the same as +line_analyzer.BINARY_...
PypiClean