id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Flask_Unchained-0.9.0-py3-none-any.whl/flask_unchained/bundles/controller/templates.py
import re from flask import request from flask.templating import DispatchingJinjaLoader, Environment from flask_unchained import unchained from jinja2 import TemplateNotFound from typing import * TEMPLATE_OVERRIDE_RE = re.compile(r'^(?P<template>.+)__(?P<depth>\d+)__$') def parse_template(template): """returns...
PypiClean
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/session/session.py
import asyncio import logging import os from hashlib import sha1 from io import BytesIO import pyrogram from pyrogram import raw from pyrogram.connection import Connection from pyrogram.crypto import mtproto from pyrogram.errors import ( RPCError, InternalServerError, AuthKeyDuplicated, FloodWait, ServiceUnavaila...
PypiClean
/Nereid-2.8.0.3.tar.gz/Nereid-2.8.0.3/nereid/helpers.py
import os import posixpath import mimetypes from time import time from zlib import adler32 import re import urllib import unicodedata from functools import wraps from hashlib import md5 from flask.helpers import _assert_have_json, json, jsonify, \ _PackageBoundObject, locked_cached_property from werkzeug import He...
PypiClean
/Eskapade_Core-1.0.0-py3-none-any.whl/escore/core_ops/links/skip_chain_if_present.py
from escore import process_manager, DataStore, Link, StatusCode class SkipChainIfPresent(Link): """Sends a SkipChain enums.StatusCode signal when a requested dataset is present. This signal causes that the Processs Manager to step immediately to the next Chain. """ def __init__(self, **kwargs): ...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/Gyre-Pagella/Size4/Regular/Main.js
MathJax.OutputJax.SVG.FONTDATA.FONTS.GyrePagellaMathJax_Size4={directory:"Size4/Regular",family:"GyrePagellaMathJax_Size4",id:"GYREPAGELLASIZE4",32:[0,0,250,0,0,""],40:[1093,593,573,135,483,"483 1065c-188 -189 -276 -437 -276 -700v-230c0 -263 88 -511 276 -700c-6 -3 -11 -7 -16 -12s-9 -10 -12 -16c-199 199 -320 450 -320 72...
PypiClean
/ActiveReign-1.0.5.tar.gz/ActiveReign-1.0.5/ar3/core/ldap/__init__.py
from impacket.ldap import ldap from ar3.core.connector import Connector from ar3.core.ldap.query import QUERIES, ATTRIBUTES class LdapCon(Connector): def __init__(self, args, loggers, host, db): Connector.__init__(self, args, loggers, host) self.ldaps = False self.con = None self....
PypiClean
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/lib/base_wizard.py
import os import bitcoin import keystore from keystore import bip44_derivation from wallet import Wallet, Imported_Wallet, Standard_Wallet, Multisig_Wallet, wallet_types from i18n import _ from plugins import run_hook class BaseWizard(object): def __init__(self, config, storage): super(BaseWizard, self)....
PypiClean
/0x-web3-5.0.0a5.tar.gz/0x-web3-5.0.0a5/web3/middleware/pythonic.py
import codecs import operator from eth_utils.curried import ( combine_argument_formatters, is_address, is_bytes, is_integer, is_null, is_string, remove_0x_prefix, text_if_str, to_checksum_address, ) from hexbytes import ( HexBytes, ) from web3._utils.abi import ( is_length,...
PypiClean
/MyDsHelper-0.1.tar.gz/MyDsHelper-0.1/DsHelper/processing/base_nlp_preprocessing.py
import re from functools import lru_cache from typing import Optional, Callable, Set, List import nltk import pandas as pd from nltk.corpus import stopwords from nltk.stem.snowball import PorterStemmer from DsHelper.processing.base_preprocessor import BasePreProcessor class BaseNlpPreProcessor(BasePreProcessor): ...
PypiClean
/CephQeSdk-1.0.0.tar.gz/CephQeSdk-1.0.0/src/RhcsQeSdk/core/cli/ceph/auth.py
import logging import RhcsQeSdk.core.cli.fabfile as fabfile logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter = logging.Formatter( "%(asctime)s - %(levelname)s - %(name)s:%(lineno)d - %(message)s" ) stream_handler = logging.StreamHandler() stream_handler.setFormatter(formatter) strea...
PypiClean
/HoChiMinh-1.0.0-py3-none-any.whl/hochiminh/image_processing/cross_detector.py
import numpy as np from hochiminh.image_processing.geometry import Point class CrossDetector: def __init__(self, max_steps=12, line_width=2, detected_steps=11): self.max_steps = max_steps self.line_width = line_width self.detected_steps = detected_steps self.directs = [Point(x=0,...
PypiClean
/Flask-Hopak-0.1.0.tar.gz/Flask-Hopak-0.1.0/flask_hopak/static/wysihtml5/bootstrap-wysihtml5-0.0.2.min.js
!function(a,b){"use strict";var c={"font-styles":"<li class='dropdown'><a class='btn dropdown-toggle' data-toggle='dropdown' href='#'><i class='icon-font'></i>&nbsp;<span class='current-font'>Normal text</span>&nbsp;<b class='caret'></b></a><ul class='dropdown-menu'><li><a data-wysihtml5-command='formatBlock' data-wysi...
PypiClean
/HolmesV-2021.10.8.tar.gz/HolmesV-2021.10.8/README.md
# HOLMES V HOLMES V is an enhanced version of [HolmesIV](https://github.com/HelloChatterbox/HolmesIV) ## Install The main assumption of HolmesV is that you may want to run only some pieces of the mycroft stack, this means the requirements vary wildly depending on the use case. eg, if you are making a web chatbot ...
PypiClean
/FicusFramework-3.1.0.post2.tar.gz/FicusFramework-3.1.0.post2/src/factdatasource/persistence/custom/CustomFactDatasourceContext.py
import logging from api.model.FactDatasource import FactDatasource from factdatasource.execptions import NotSupportedFDException from factdatasource.persistence.AbstractFactDatasourceContext import AbstractFactDatasourceContext log = logging.getLogger('Ficus') class CustomFactDatasourceContext(AbstractFactDatasourc...
PypiClean
/Finance-Jindowin-1.3.3.tar.gz/Finance-Jindowin-1.3.3/jdw/mfc/entropy/gravity/dendall/base.py
import pdb import pandas as pd from ultron.tradingday import * from ultron.factor.data.transformer import Transformer from ultron.strategy.optimize import Optimize from jdw.kdutils.logger import kd_logger from jdw.mfc.entropy.gravity.dendall.params import create_params class Base(object): def __init__(self, ...
PypiClean
/LCS-DIVE-1.0.10.tar.gz/LCS-DIVE-1.0.10/LCSDIVE/AnalysisPhase1_pretrainedJob.py
import pickle from skExSTraCS import ExSTraCS import os import numpy as np import csv import time import sys from skrebate import MultiSURF def job(experiment_path,cv): job_start_time = time.time() file = open(experiment_path+'/phase1pickle', 'rb') phase1_pickle = pickle.load(file) file.close() ...
PypiClean
/CloudHummingbird-1.1.0-py3-none-any.whl/Hummingbird/instance.py
import sqlite3 import subprocess from retry import retry class Instance: @staticmethod def get_machine_types(conf, min_mem): service = conf['Platform']['service'] service = service.lower() cpu_list = conf['Profiling'].get('thread', [2]) if service in ['google', 'gcp']: ...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_ar-tn.js
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "\u0635", "\u0645" ], "DAY": [ "\u0627\u0644...
PypiClean
/Oasys-Canvas-Core-1.0.7.tar.gz/Oasys-Canvas-Core-1.0.7/orangecanvas/application/welcomedialog.py
from PyQt5.QtWidgets import ( QDialog, QWidget, QToolButton, QCheckBox, QAction, QHBoxLayout, QVBoxLayout, QSizePolicy ) from PyQt5.QtGui import ( QFont, QPixmap, QIcon, QPainter, QColor, QBrush ) from PyQt5.QtCore import Qt, QRect, QPoint from PyQt5.QtCore import pyqtSignal as Signal from ..canvas.i...
PypiClean
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/data/transform/vision/functional.py
import collections.abc import functools import random import cv2 import numpy as np def wrap_keepdims(func): r"""Wraper to keep the dimension of input images unchanged.""" @functools.wraps(func) def wrapper(image, *args, **kwargs): if len(image.shape) != 3: raise ValueError( ...
PypiClean
/Metage2Metabo-1.5.4.tar.gz/Metage2Metabo-1.5.4/metage2metabo/__main_analysis__.py
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public Lic...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/categories/management/commands/prunecategories.py
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from ...models import Category class Command(BaseCommand): """ This command is intended to work as CRON job fired every few days (or more often) to execute categories pruning policies ...
PypiClean
/Flask_PaycomUz-1.2.5-py3-none-any.whl/flask_paycomuz/views.py
from flask import request from flask.views import MethodView from .errors import PaycomErrors import time p_errors = PaycomErrors() class Paycom_JSON_RPC(): def __init__(self, db, models, account_data, validator, callback): self.models = models self.db = db self.Payme_Transaction, self.Paym...
PypiClean
/FTIRE_jweng-0.1.4-py3-none-any.whl/FTIRE/dcor/_rowwise.py
import numpy as np from . import _dcor from ._fast_dcov_avl import _rowwise_distance_covariance_sqr_avl_generic from ._utils import _sqrt, RowwiseMode def _generate_rowwise_distance_covariance_sqr(unbiased): def rowwise_distance_covariance_sqr( x, y, exponent=1, *, method=_dcor.DistanceCo...
PypiClean
/Localization-0.1.7.tar.gz/Localization-0.1.7/localization/geometry.py
import math as math import numpy as num # ~ from myBasic import pickColor # Global res = 0.0001 s_res = math.pi / 180.0 def order(v, w, mode=0): a = zip(v, w) if mode == 0: a.sort() else: a.sort(reverse=True) l = zip(*a) v = list(l[0]) w = list(l[1]) return [v, w] def c...
PypiClean
/LT3OpenCorpora-0.2.1-py3-none-any.whl/lt3opencorpora/convert.py
import re import sys import gzip import os.path from typing import List, Optional, Set, Union import bz2 import codecs import logging import xml.etree.cElementTree as ET from csv import DictReader # To add stats collection in inobstrusive way (that can be simply disabled) from blinker import signal sys.stdout = codec...
PypiClean
/AlignQC-2.0.5.tar.gz/AlignQC-2.0.5/alignqc/locus_bed_to_rarefraction.py
import sys, argparse, gzip, re, random, collections, inspect, os from multiprocessing import Pool, cpu_count from seqtools.statistics import average, median def main(args): inf = sys.stdin if args.input != '-': if re.search('\.gz$',args.input): inf = gzip.open(args.input) else: inf = open(ar...
PypiClean
/Emonic-1.0.1.tar.gz/Emonic-1.0.1/emonic/totp/totp.py
import hashlib import hmac import time import secrets import qrcode import urllib.parse from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC import base64 class Emonictpt: def __init__(self, secre...
PypiClean
/Flask_Attachment_New-1.0.1-py3-none-any.whl/flask_attachment/data/Operation.py
import os from enum import Enum from flask_attachment.data import OutputType class Mode(Enum): NONE = 'none' MOVE = 'move' REMOVE = 'remove' CROP_SQUARE = 'crop_square' RESIZE = 'resize' BINARYZATION = 'binaryzation' class Operation(object): ORIGINAL_FILENAME = 'original' def __in...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/unique.py
#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, distribute, sublicense, and/or sell #copi...
PypiClean
/DataX_AwesomeAnimations-0.0.1-py3-none-any.whl/datax/__init__.py
import os dirname = "DATAX_API_FILES" def store_new_content(filename,jsontrue,name,f1 = None,f2 = None,f3 = None,*arg): if os.path.exists(f"{dirname}"): file1 = open(f"{dirname}/{filename}.txt","w") fulllist = [name,f1,f2,f3, *arg] varlist = ':'.join(fulllist) file1.write(f"{varlist} \n") f...
PypiClean
/MolGNN_try_2-0.0.1.tar.gz/MolGNN_try_2-0.0.1/MolToGraph/MolToGraph.py
from numbers import Number from typing import Sequence, Any, List import numpy as np import torch from rdkit import Chem from rdkit.Chem.rdmolops import GetAdjacencyMatrix from torch_geometric.data import Data def one_hot_encoding(x: Any, values: Sequence[Any]) -> List[int]: """ Sparse one-hot encoding of an...
PypiClean
/Keras_Applications_3D-0.1.0-py3-none-any.whl/keras_applications_3d/applications/mobilenet_v3.py
"""MobileNet v3 models for Keras.""" from tensorflow.python.keras import backend from tensorflow.python.keras import models from tensorflow.python.keras.applications import imagenet_utils from tensorflow.python.keras.layers import VersionAwareLayers from tensorflow.python.keras.utils import data_utils from tensorflow....
PypiClean
/Notable-0.4.2.tar.gz/Notable-0.4.2/notable/static/lib/mousetrap.min.js
(function(J,r,f){function s(a,b,d){a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent("on"+b,d)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return h[a.which]?h[a.which]:B[a.which]?B[a.which]:String.fromCharCode(a.which).toLowerCase()}function...
PypiClean
/EdgeDetector-1.0.0-py3-none-any.whl/src/AllEdgesDetection.py
from PIL import Image import numpy as np import cv2 def Canny_Deriche_edge_detection(img_name): # Read the image img = Image.open(img_name) # Convert the image to grayscale gray = img.convert('L') # Apply the Canny-Deriche edge detector edges = np.zeros(gray.size) for i in range(1, gray.s...
PypiClean
/McImage-1.1.win32.zip/Python35/Scripts/mcimage.py
import sys import requests import bs4 import os import urllib import logging from time import gmtime, strftime from os.path import expanduser from optparse import OptionParser def main(): VERSION = '1.0 Beta' try: if os.path.isdir(expanduser('~/Pictures')): HOME = expanduser('~/Pictures')...
PypiClean
/NlpToolkit-WordSenseDisambiguation-1.0.3.tar.gz/NlpToolkit-WordSenseDisambiguation-1.0.3/WordSenseDisambiguation/Sentence/TurkishSentenceAutoSemantic.py
from MorphologicalAnalysis.FsmMorphologicalAnalyzer import FsmMorphologicalAnalyzer from WordNet.WordNet import WordNet from AnnotatedSentence.AnnotatedSentence import AnnotatedSentence from AnnotatedSentence.AnnotatedWord import AnnotatedWord from WordSenseDisambiguation.Sentence.SentenceAutoSemantic import SentenceA...
PypiClean
/MikeT_messenger_client-0.4.1.tar.gz/MikeT_messenger_client-0.4.1/client/common/metaclasses.py
import dis class ServerMaker(type): """ Метакласс, проверяющий что в результирующем классе нет клиентских вызовов таких как: connect. Также проверяется, что серверный сокет является TCP и работает по IPv4 протоколу. """ def __init__(cls, clsname, bases, clsdict): methods = [] a...
PypiClean
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/methods/chats/pin_chat_message.py
from typing import Union import pyrogram from pyrogram import raw, types class PinChatMessage: async def pin_chat_message( self: "pyrogram.Client", chat_id: Union[int, str], message_id: int, disable_notification: bool = False, both_sides: bool = False, ) -> "types.Mes...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/pubsub/pub.py
:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved. :license: BSD, see LICENSE_BSD_Simple.txt for details. """ VERSION_API = 3 #: major API version VERSION_SVN = "$Rev: 243 $".split()[1] # DO NOT CHANGE: automatically updated by VCS from .core import ( Publisher as _Publisher, AUTO...
PypiClean
/DEC_Tec_decode-0.0.3-py3-none-any.whl/decode/decode.py
import os import sys import argparse import cmder def main(): parser = argparse.ArgumentParser(description=__doc__.splitlines()[0].strip()) parser.add_argument('-a', '--analysis-id', help='Analysis ID identifies a decoding sample.', type=int) parser.add_argument('-s', '--selection-id', help='Selection ID...
PypiClean
/CTP/MdApi.py
# AlgoPlus量化投资开源框架 # 微信公众号:AlgoPlus # 官网:http://algo.plus import os import csv from AlgoPlus.CTP.MdApiBase import MdApiBase from AlgoPlus.CTP.FutureAccount import FutureAccount from AlgoPlus.ta.time_bar import tick_to_bar from AlgoPlus.utils.base_field import to_str, to_bytes from AlgoPlus.CTP.ApiStruct import DepthM...
PypiClean
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/lattices/Struct46.py
pairs=""" 199 88 71 180 95 180 81 90 97 174 136 126 24 68 93 66 181 26 183 212 119 102 132 58 7 57 206 149 114 56 51 157 50 125 99 45 131 136 201 77 90 85 27 88 66 109 1 40 42 0 36 178 155 132 211 94 127 32 31 179 31 184 33 201 42 195 32 163 8 84 185 156 193 124 213 16 113 82 135 32 2 28 26 105 175 214 8 143 125 64 92 ...
PypiClean
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/checks/format.py
import re from collections import defaultdict from typing import Optional, Pattern from django.utils.functional import SimpleLazyObject from django.utils.html import format_html, format_html_join from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ from weblate.checks.b...
PypiClean
/CleanEmon-Backend-0.5.tar.gz/CleanEmon-Backend-0.5/src/CleanEmonBackend/Disaggregator/preparation.py
from datetime import datetime import json import pandas as pd from CleanEmonCore.models import EnergyData INTERVAL = 5 INTERVAL_STR = f"{INTERVAL}S" PERIODS = 60*60*24/INTERVAL def reformat_timestamp(stamp: float) -> str: dt = datetime.fromtimestamp(stamp) return dt.strftime("%Y-%m-%d %H:%M:%S+01:00") de...
PypiClean
/DexBuyTools-0.1.1.tar.gz/DexBuyTools-0.1.1/dexbuytools/helpers/data/ftm.py
chain_data = { 'MAIN_TOKEN_ADDRESS': '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', 'MAIN_TOKEN_ABI': '[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"interna...
PypiClean
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/hmf/_hmf.py
from foilmesh import meshio from .._common import cell_data_from_raw, raw_from_cell_data, warn from .._helpers import register_format from ..xdmf.common import meshio_to_xdmf_type, xdmf_to_meshio_type def read(filename): import h5py with h5py.File(filename, "r") as f: assert f.attrs["type"] == "hmf"...
PypiClean
/EagleSCR-0.2.0.tar.gz/EagleSCR-0.2.0/eaglescr/parser.py
import re import models models_to_match = [ models.Prefix , models.EditDevice , models.EditSymbol , models.Pin , models.Wire , models.Layer , models.Connect , models.Description , models.Attribute , models.EditPackage , models.Package , models.A...
PypiClean
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/doc/sphinx/source/advanced/i18n.rst
.. _dolc-i18n: ###################### Internationalization ###################### The Camelot translation system is a very small wrapper around the Qt translation system. Internally, it uses the :meth:`QCoreApplication.translate` method to do the actual translation. On top of that, it adds the possibility for end...
PypiClean
/Group%20Buy%20Organizer-1.0.3.tar.gz/Group Buy Organizer-1.0.3/groupbuyorganizer/general/forms.py
from flask_login import current_user from flask_wtf import FlaskForm from wtforms import BooleanField, PasswordField, StringField, SubmitField from wtforms.validators import DataRequired, Email, EqualTo, Length, ValidationError from groupbuyorganizer.admin.models import User class RegistrationForm(FlaskForm): ''...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/users/serializers/auth.py
from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import serializers from ...acl.useracl import serialize_user_acl from .user import UserSerializer User = get_user_model() __all__ = ["AuthenticatedUserSerializer", "AnonymousUserSerializer"] class AuthFlags: def ...
PypiClean
/Algo-Vi-1.0.3.tar.gz/Algo-Vi-1.0.3/Search-Vi/__main__.py
import time def Linear(l, valu): cout = len(l) for i in range(0, len(l)): if (l[i] == valu): print(l[0:i], '\x1b[6;30;42m' + str(l[i]) + '\x1b[0m', l[i + 1:len(l)]) print(l[i], "is equal to", valu) cout -= 1 time.sleep(1) break els...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/benefits.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def benefits(path): """Unemployment of Blue Collar Workers a cross-section from 1972 *numbe...
PypiClean
/Beeswarm-0.7.18.tar.gz/Beeswarm-0.7.18/beeswarm/drones/client/baits/ftp.py
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along...
PypiClean
/MetaAssemblyImprove-0.0.1-py3-none-any.whl/MetaAssemblieImprove/Main.py
import argparse from loguru import logger from biosut import gt_exe, gt_file, gt_path from .scaffolder import Scaffolder from .gapfiller import GapFiller class ReadPar: @classmethod def read(cls): p = argparse.ArgumentParser(description=__doc__) g = p.add_argument_group("Required parameter...
PypiClean
/LightZero-0.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/lzero/model/image_transform.py
from typing import Tuple, List import random import torch import torch.nn as nn class Intensity(nn.Module): """ Overview: Intensity transformation for data augmentation. Scale the image intensity by a random factor. """ def __init__(self, scale: float) -> None: """ Arguments: ...
PypiClean
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/secure/DOM.js
if(!dojo._hasResource["dojox.secure.DOM"]){ dojo._hasResource["dojox.secure.DOM"]=true; dojo.provide("dojox.secure.DOM"); dojo.require("dojox.lang.observable"); dojox.secure.DOM=function(_1){ function _2(_3){ if(!_3){ return _3; } var _4=_3; do{ if(_4==_1){ return _5(_3); } }while((_4=_4.parentNode)); return null; }; f...
PypiClean
/Fortpy-1.7.7.tar.gz/Fortpy-1.7.7/fortpy/parsers/types.py
import re from ..elements import CustomType, TypeExecutable class TypeParser(object): """Extracts custom type definitions from fortran code files.""" def __init__(self, vparser, docparser): self.vparser = vparser self.docparser = docparser self.setup_regex() def setup_regex(self): ...
PypiClean
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/client/account.py
import functools import inspect import typing from .users import _NOT_A_REQUEST from .. import helpers, utils from ..tl import functions, TLRequest if typing.TYPE_CHECKING: from .telegramclient import TelegramClient # TODO Make use of :tl:`InvokeWithMessagesRange` somehow # For that, we need to use :tl:`Ge...
PypiClean
/DI-treetensor-0.4.1.tar.gz/DI-treetensor-0.4.1/treetensor/common/trees.py
from functools import partial from typing import Type from hbutils.reflection import post_process from treevalue import func_treelize as original_func_treelize from treevalue import general_tree_value, TreeValue, typetrans from treevalue.tree.common import TreeStorage from ..utils import replaceable_partial, args_map...
PypiClean
/Flask-Scaffold-0.5.1.tar.gz/Flask-Scaffold-0.5.1/app/templates/static/node_modules/angular-grid/docs/angular-grid-master-slave/exampleFloatingFooter.js
var module = angular.module("example", ["angularGrid"]); module.controller("exampleCtrl", function($scope, $http) { var columnDefs = [ {headerName: "Athlete", field: "athlete", width: 200}, {headerName: "Age", field: "age", width: 100}, {headerName: "Country", field: "country", width: 150}...
PypiClean
/NVDA-addonTemplate-0.5.2.zip/NVDA-addonTemplate-0.5.2/NVDAAddonTemplate/data/{{cookiecutter.project_slug}}/scons-local-2.5.0/SCons/Tool/cyglink.py
import re import os import SCons.Action import SCons.Util import SCons.Tool import gnulink import link def _lib_generator(target, source, env, for_signature, **kw): try: cmd = kw['cmd'] except KeyError: cmd = SCons.Util.CLVar(['$SHLINK']) try: vp = kw['varprefix'] except KeyError: vp = 'SHLIB' ...
PypiClean
/ChronologerUI-0.4.1.tar.gz/ChronologerUI-0.4.1/README.rst
.. image:: https://img.shields.io/badge/dynamic/json.svg?url=https://api.bitbucket.org/2.0/repositories/557058:818b45a5-8b1c-4614-a8e8-e938f448b93c/chronologer/pipelines/?page=1%26pagelen=1%26sort=-created_on%26target.ref_name=frontend&label=build&query=$.values[0].state.result.name&colorB=blue :target: https://bitb...
PypiClean
/ExtProxy-1.0.3.tar.gz/ExtProxy-1.0.3/extproxy/util.py
import socket import select import errno import threading from .compat import PY3, mtime def _forward_socket(local, remote, wait_local=False, timeout=60, tick=4, bufsize=1024*32): buf = memoryview(bytearray(bufsize)) maxpong = timeout allins = [local, remote] timec...
PypiClean
/GoogleAppEngineMapReduce-1.9.22.0.tar.gz/GoogleAppEngineMapReduce-1.9.22.0/mapreduce/mapper_pipeline.py
__all__ = [ "MapperPipeline", ] from mapreduce import control from mapreduce import model from mapreduce import parameters from mapreduce import pipeline_base # pylint: disable=g-bad-name # pylint: disable=protected-access class MapperPipeline(pipeline_base._OutputSlotsMixin, pipeline_...
PypiClean
/BuildNotify-2.1.0.tar.gz/BuildNotify-2.1.0/buildnotifylib/buildnotify.py
import sys from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMessageBox from buildnotifylib.app_notification import AppNotification from buildnotifylib.app_ui import AppUi from buildnotifylib.build_icons import BuildIcons from buildnotifylib.config import Config from buildnotifylib.core.projects import Proj...
PypiClean
/125softNLP-0.0.1-py3-none-any.whl/pysoftNLP/extraction/keyword.py
import math import jieba import jieba.posseg as psg from gensim import corpora, models from jieba import analyse import functools # 停用词表加载方法 def get_stopword_list(): # 停用词表存储路径,每一行为一个词,按行读取进行加载 # 进行编码转换确保匹配准确率 stop_word_path = 'D:\pysoftNLP_resources\extraction\stopword\stopword.txt' stopword_list = [...
PypiClean
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/pages/api/_api_page.py
import json import flask from flask import Response import inginious.common.custom_yaml as yaml from inginious.frontend.pages.utils import INGIniousPage class APIPage(INGIniousPage): """ Generic handler for all API pages """ def GET(self, *args, **kwargs): """ GET request """ return self._ha...
PypiClean
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/docs/source/index.rst
.. BigJob documentation master file, created by sphinx-quickstart on Mon Dec 3 21:55:42 2012. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. ############################## BigJob |version| User Manual ############################## BigJob is ...
PypiClean
/MozPhab-1.4.3-py3-none-any.whl/mozphab/bmo.py
import copy import json import time import urllib.parse as url_parse import urllib.error as url_error import urllib.request as url_request from .conduit import conduit from .environment import USER_AGENT from .exceptions import Error from .logger import logger class BMOAPIError(Error): """Raised when the Bugzill...
PypiClean
/LSHlink-ffghcv-0.2.tar.gz/LSHlink-ffghcv-0.2/LSHlink/__init__.py
import sklearn import sklearn.datasets import numpy as np import matplotlib.pyplot as plt from scipy.cluster.hierarchy import dendrogram, linkage import numba from numba.errors import NumbaDeprecationWarning, NumbaPendingDeprecationWarning import warnings warnings.simplefilter('ignore', category=NumbaDeprecationWarni...
PypiClean
/Flask-MDBootstrap-3.0.5.tar.gz/Flask-MDBootstrap-3.0.5/flask_mdbootstrap/static/MDB-Pro/js/modules/sidenav.min.js
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/markup/mentions.py
import re from typing import Union from django.contrib.auth import get_user_model from ..users.utils import slugify_username from .htmlparser import ( ElementNode, RootNode, TextNode, ) EXCLUDE_ELEMENTS = ("pre", "code", "a") USERNAME_RE = re.compile(r"@[0-9a-z_]+", re.IGNORECASE) MENTIONS_LIMIT = 32 d...
PypiClean
/Bubot_CoAP-1.0.7-py3-none-any.whl/Bubot_CoAP/messages/numbers/optionnumbers.py
from ...utils import ExtensibleIntEnum from ...messages import optiontypes class OptionNumber(ExtensibleIntEnum): """A CoAP option number. As the option number contains information on whether the option is critical, and whether it is safe-to-forward, those properties can be queried using the `is_*` g...
PypiClean
/Mirador-0.3.3.tar.gz/Mirador-0.3.3/mirador/result.py
from errors import http_exceptions, MiradorException import sys import json class MiradorResultList(object): def __init__(self, items=[]): self._items = {} def _add(self, items=[]): for x in items: self._items[x.id] = x def concat(self, more=[]): self._add(more) ...
PypiClean
/OTLModel/Classes/Bovenbouw.py
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.AIMObject import AIMObject from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument from OTLMOW.OTLModel.Datatypes.KlDekselKaderType import KlDekselKaderTyp...
PypiClean
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/model/accounting_phone_number.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
/Flask-AppBuilder-red-2.1.13.tar.gz/Flask-AppBuilder-red-2.1.13/flask_appbuilder/models/sqla/filters.py
import datetime import logging from dateutil import parser from flask_babel import lazy_gettext from ..filters import BaseFilter, BaseFilterConverter, FilterRelation log = logging.getLogger(__name__) __all__ = [ "SQLAFilterConverter", "FilterEqual", "FilterNotStartsWith", "FilterStartsWith", "F...
PypiClean
/GeneticEngine-0.7.3.tar.gz/GeneticEngine-0.7.3/geneticengine/algorithms/gp/operators/selection.py
from __future__ import annotations import numpy as np from geneticengine.algorithms.gp.individual import Individual from geneticengine.algorithms.gp.structure import GeneticStep from geneticengine.core.problems import Fitness, MultiObjectiveProblem from geneticengine.core.problems import Problem from geneticengine.co...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/mpmath/identification.py
from .libmp.backend import xrange from .libmp import int_types, sqrt_fixed # round to nearest integer (can be done more elegantly...) def round_fixed(x, prec): return ((x + (1<<(prec-1))) >> prec) << prec class IdentificationMethods(object): pass def pslq(ctx, x, tol=None, maxcoeff=1000, maxsteps=100, verbo...
PypiClean
/EventRecorder-1.0.0-py3-none-any.whl/scripts/main.py
import sys,os # sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) import argparse import datetime import functools import pprint import time from pickling import loadEvents, saveEvents from filterSearch import extractForRange, extractForSpecificDate, \ extractForToday, deleteEventOn eventLis...
PypiClean
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/visualize/utils/tree/rules.py
r"""Rules for classification and regression trees. Tree visualisations usually need to show the rules of nodes, these classes make merging these rules simple (otherwise you have repeating rules e.g. `age < 3` and `age < 2` which can be merged into `age < 2`. Subclasses of the `Rule` class should provide a nice interf...
PypiClean
/Eryn-1.1.4.tar.gz/Eryn-1.1.4/eryn/moves/gaussian.py
import numpy as np from .mh import MHMove __all__ = ["GaussianMove"] class GaussianMove(MHMove): """A Metropolis step with a Gaussian proposal function. This class is heavily based on the same class in ``emcee``. Args: cov (dict): The covariance of the proposal function. The keys are branch n...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/forms/utils.py
import json from collections import UserList from django.conf import settings from django.core.exceptions import ValidationError # backwards compatibility from django.utils import timezone from django.utils.html import escape, format_html, format_html_join, html_safe from django.utils.translation import gettext_lazy ...
PypiClean
/Flask_APIAuth-0.1.1-py3-none-any.whl/flask_APIAuth/core.py
from functools import wraps from flask import request, g import base64 __version__ = '1.0.0dev' class ApiAuth: def __init__(self, split_character=' '): # 分割词,最好唯一且不出现在账号里 # Segmentation words, preferably # unique and do not appear in the account self.split_character = split_chara...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/localization/bcc/TeX.js
MathJax.Localization.addTranslation("bcc","TeX",{version:"2.7.9",isLoaded:true,strings:{ExtraOpenMissingClose:"\u0622\u06A9\u0648\u0644\u0627\u062F \u0628\u0627\u0632 \u0627\u0636\u0627\u0641\u06CC \u06CC\u0627 \u0641\u0642\u062F\u0627\u0646 \u0622\u06A9\u0648\u0644\u0627\u062F \u0628\u0633\u062A\u0647",ExtraCloseMissi...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/admin/views/main.py
from collections import OrderedDict from datetime import datetime, timedelta from django.conf import settings from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin.options import ( IS_P...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/gis/gdal/prototypes/ds.py
from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, geom_output, int_output, srs_output, void_...
PypiClean
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/wheel/wheelfile.py
from __future__ import print_function import csv import hashlib import os.path import re import stat import time from collections import OrderedDict from distutils import log as logger from zipfile import ZIP_DEFLATED, ZipInfo, ZipFile from wheel.cli import WheelError from wheel.util import urlsafe_b64decode, as_unic...
PypiClean
/EXtra_geom-1.10.0-py3-none-any.whl/extra_geom/base.py
from functools import lru_cache from itertools import chain from warnings import warn import numpy as np from cfelpyutils.geometry import load_crystfel_geometry from .crystfel_fmt import write_crystfel_geom from .snapped import GridGeometryFragment, SnappedGeometry class GeometryFragment: """Holds the 3D positi...
PypiClean
/MeshLabXML-2018.3.tar.gz/MeshLabXML-2018.3/meshlabxml/clean.py
from . import util def merge_vert(script, threshold=0.0): """ Merge together all the vertices that are nearer than the specified threshold. Like a unify duplicate vertices but with some tolerance. Args: script: the FilterScript object or script filename to write the filter to. ...
PypiClean
/MLMath-0.0.0rc1.tar.gz/MLMath-0.0.0rc1/mlm/torch/_torch_backend.py
import numbers import warnings from contextlib import contextmanager from functools import wraps from typing import List, Callable, Optional, Set, Tuple, Any import numpy as np import torch import torch.fft import torch.nn.functional as torchf from packaging import version from mlm.math import DType from mlm.math.bac...
PypiClean
/CRISPRbean-0.1.0.tar.gz/CRISPRbean-0.1.0/beige/model.py
import torch import torch.distributions as tdist import pyro from pyro import poutine import pyro.distributions as dist import torch.distributions.constraints as constraints def get_alpha(expected_guide_p, size_factor, sample_mask, a0, epsilon=1e-10): p = expected_guide_p.permute( 0, 2, 1) * size_...
PypiClean
/OASYS1-WOFRY-1.0.41.tar.gz/OASYS1-WOFRY-1.0.41/orangecontrib/wofry/widgets/gui/ow_optical_element.py
import sys, numpy from PyQt5.QtGui import QPalette, QColor, QFont from PyQt5.QtWidgets import QMessageBox from orangewidget import gui from orangewidget import widget from orangewidget.settings import Setting from oasys.widgets import gui as oasysgui from oasys.widgets import congruence from oasys.widgets.gui import ...
PypiClean
/Ax_FuzzyTourney-0.8.1.tar.gz/Ax_FuzzyTourney-0.8.1/axonchisel/fuzzytourney/select.py
import sys import random # ---------------------------------------------------------------------------- class SelectFunction(object): """Select function superclass.""" def __init__(self, config): raise NotImplementedError() def open(self, tournament, entrants): """Abstract: Begin handl...
PypiClean
/CSUMMDET-1.0.23.tar.gz/CSUMMDET-1.0.23/mmdet/datasets/custom.py
import os.path as osp import mmcv import numpy as np from torch.utils.data import Dataset from .pipelines import Compose from .registry import DATASETS @DATASETS.register_module class CustomDataset(Dataset): """Custom dataset for detection. Annotation format: [ { 'filename': 'a.jpg'...
PypiClean
/AI4Water-1.6.tar.gz/AI4Water-1.6/ai4water/_optimize.py
import gc import math import importlib from typing import Union from SeqMetrics import RegressionMetrics, ClassificationMetrics from .utils.utils import clear_weights, TrainTestSplit from .utils.utils import dateandtime_now, jsonize, MATRIC_TYPES, update_model_config DEFAULTS = { 'r2': 1.0, 'nse': 1.0, '...
PypiClean
/ADPTC_LIB-0.0.7.tar.gz/ADPTC_LIB-0.0.7/README.md
<!-- * @Description: * @Author: SongJ * @Date: 2020-12-29 13:52:28 * @LastEditTime: 2021-04-12 10:44:01 * @LastEditors: SongJ --> ## 自适应密度峰值树聚类(Adaptive Density Peak Tree Clustering) 本算法是在快速搜索与发现密度峰值聚类算法(Clustering by fast search and find of density peaks)CFSFDP的基础上进行改进的成果,主要解决的问题有: - 手动选择聚类中心 - 单簇多密度峰值导致类簇误分 - ...
PypiClean
/EMMO-1.0.1-py3-none-any.whl/emmo/graph.py
import os import re import tempfile import xml.etree.ElementTree as ET import owlready2 import graphviz from .utils import asstring, get_label from .ontology import get_ontology typenames = owlready2.class_construct._restriction_type_2_label # Literal for `root` arguments ALL = 1 _default_style = { 'graphtype...
PypiClean
/GeophPy-0.32.2.tar.gz/GeophPy-0.32.2/geophpy/plotting/colormap.py
import matplotlib.pyplot as plt import numpy as np import os import geophpy.misc.utils as gputils import matplotlib._cm as cm # list of available colormaps ##cmap_list = ['Blues', ## 'BrBG', ## 'BuGn', ## 'BuPu', ## 'CMRmap', ## 'GnBu', ## 'Green...
PypiClean