id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Keras_Applications_3D-0.1.0-py3-none-any.whl/keras_applications_3d/applications/densenet.py
from tensorflow.python.keras import backend from tensorflow.python.keras.applications import imagenet_utils from tensorflow.python.keras.engine import training from tensorflow.python.keras.layers import VersionAwareLayers from tensorflow.python.keras.utils import data_utils from tensorflow.python.keras.utils import lay...
PypiClean
/Flask-AppBuilder-jwi078-2.1.13.tar.gz/Flask-AppBuilder-jwi078-2.1.13/flask_appbuilder/static/appbuilder/datepicker/bootstrap-datepicker.js
(function(e){function c(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function h(e,t,n){if(t<e.length)return e;else return Array(t-e.length+1).join(n||" ")+e}function p(e,t,n,r,i,s,o,u){if(r&&i){return'<div class="bootstrap-datetimepicker-widget dropdown-menu" style="z-index:9999 !important;">'+'<ul...
PypiClean
/KAVICA-1.3.4.tar.gz/KAVICA-1.3.4/kavica/feature_selection/feature_analysis.py
import argparse import json import sys import time import warnings from abc import ABC import numpy as np import pandas as pd import scipy.cluster.hierarchy as sch from kavica.distance_measure import euclidean_distance from kavica.factor_analysis.factor_rotation import ObliqueRotation from kavica.imputation.base import...
PypiClean
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/ticketing/model/comment_endpoint_request.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
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/lorem/zh_TW/__init__.py
from typing import Dict from .. import Provider as LoremProvider class Provider(LoremProvider): """Implement lorem provider for ``zh_TW`` locale.""" word_connector = "" word_list = ( "一個", "我們", "時間", "台灣", "可以", "公司", "沒有", "信息", "...
PypiClean
/IST411Team1AduDarko-1.0.0.tar.gz/IST411Team1AduDarko-1.0.0/IST411Team1/node2.py
import socket, ssl, json, sys, smtplib, hashlib, time, pysftp, subprocess, p2p from node5 import Node5 from email.mime.text import MIMEText """calls clock() to track time""" beginTime = time.clock() class Node2: def __init__(self,name): self.name = name self.payload = None self.checksum = None def receivePayl...
PypiClean
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/node_modules/jquery/src/deprecated.js
define( [ "./core", "./core/nodeName", "./core/camelCase", "./core/toType", "./var/isFunction", "./var/isWindow", "./var/slice", "./deprecated/ajax-event-alias", "./deprecated/event" ], function( jQuery, nodeName, camelCase, toType, isFunction, isWindow, slice ) { "use strict"; // Support: Android <=4.0 onl...
PypiClean
/Fragmenstein-0.12.11.tar.gz/Fragmenstein-0.12.11/fragmenstein/monster/mcs_mapping/compare_atom.py
from rdkit import Chem from rdkit.Chem import rdFMCS # TypedDict & Unpack fixed in .legacy: from typing import Dict, List, Union, Tuple, Optional, TypeVar, Sequence, TypedDict, Unpack # noqa from functools import singledispatchmethod # monkeypatched by .legacy (for Py3.7) import itertools from .types import IndexMap...
PypiClean
/AVISO-0.9.2.tar.gz/AVISO-0.9.2/aviso/extra.py
import os import os.path from datetime import datetime, timedelta import time import re import logging import logging.handlers import numpy import numpy as np from numpy import ma try: import netCDF4 from netCDF4 import date2num except: import pupynere from pydap.client import open_url try: from ring...
PypiClean
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/sharepoint/principal/users/collection.py
from office365.runtime.queries.create_entity import CreateEntityQuery from office365.runtime.queries.service_operation import ServiceOperationQuery from office365.runtime.paths.service_operation import ServiceOperationPath from office365.sharepoint.base_entity_collection import BaseEntityCollection from office365.share...
PypiClean
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/controller/controllers/SettingsController.py
from dataclasses import dataclass from typing import Any, List, Tuple import numpy as np from imswitch.imcommon.model import APIExport from imswitch.imcontrol.model import configfiletools from imswitch.imcontrol.view import guitools as guitools from ..basecontrollers import ImConWidgetController @dataclass class Se...
PypiClean
/Flask-Swag-0.1.2.tar.gz/Flask-Swag-0.1.2/flask_swag/resources/swagger-ui/lib/handlebars-2.0.0.js
!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";fun...
PypiClean
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/backend/static/cubane/backend/tinymce/js/tinymce/plugins/link/plugin.min.js
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.VK"),n=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},r=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_ass...
PypiClean
/EnergySystemModels-0.1.17.post63-py3-none-any.whl/NodeEditor/nodeeditor/node_graphics_edge.py
from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from NodeEditor.nodeeditor.node_graphics_edge_path import GraphicsEdgePathBezier, GraphicsEdgePathDirect class QDMGraphicsEdge(QGraphicsPathItem): """Base class for Graphics Edge""" def __init__(self, edge:'Edge', parent:QWidg...
PypiClean
/ORCID-Hub-4.16.6.tar.gz/ORCID-Hub-4.16.6/README.rst
NZ-ORCID-Hub ============ .. image:: https://travis-ci.org/Royal-Society-of-New-Zealand/NZ-ORCID-Hub.svg?branch=master :target: https://travis-ci.org/Royal-Society-of-New-Zealand/NZ-ORCID-Hub :alt: Build Status .. image:: https://coveralls.io/repos/github/Royal-Society-of-New-Zealand/NZ-ORCID-Hub/badge.svg ...
PypiClean
/ASTFormula-0.0.3.tar.gz/ASTFormula-0.0.3/astformula/main.py
import ast from typing import Union import astunparse from astformula.defaults.functions import DEFAULT_FUNCTIONS from astformula.defaults.operators import DEFAULT_OPERATORS from astformula.defaults.processors import DEFAULT_PROCESSORS from astformula.exceptions import UnsupportedASTNodeError, \ UnsupportedOperat...
PypiClean
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/doc/sphinx/sphinxext/apigen.py
import os import re # Functions and classes class ApiDocWriter(object): ''' Class for automatic detection and parsing of API docs to Sphinx-parsable reST format''' # only separating first two levels rst_section_levels = ['*', '=', '-', '~', '^'] def __init__(self, package_name, ...
PypiClean
/LiteSpeed-1.2.0.tar.gz/LiteSpeed-1.2.0/litespeed/mail.py
import mimetypes import re from email.message import EmailMessage from email.utils import make_msgid from os.path import exists from smtplib import SMTP, SMTP_SSL from threading import Thread from typing import Iterable, List, Optional, Union from urllib.request import urlopen class Mail: """Wrapper around EmailM...
PypiClean
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/@types/node/os.d.ts
declare module 'os' { interface CpuInfo { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; } interface NetworkInterfaceBase { address: string; ...
PypiClean
/ClueReleaseManager-0.3.3.tar.gz/ClueReleaseManager-0.3.3/src/clue/relmgr/cmdtool.py
import logging import optparse import os import subprocess import sys import tempfile import pkg_resources from clue.relmgr import utils from clue.relmgr.pypi import PyPi class InsecurePyPi(PyPi): def has_role(self, distro_id, *roles): return True def get_active_user(self): return 'admin' ...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/manager/Anchors.js.uncompressed.js
define("dojox/drawing/manager/Anchors", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){ dojo.provide("dojox.drawing.manager.Anchors"); dojox.drawing.manager.Anchors = dojox.drawing.util.oo.declare( // summary: // Creates and manages the anchor points that are attached to // (usually) the corners of a Stenci...
PypiClean
/HTML-as-programming-language-0.1.21.tar.gz/HTML-as-programming-language-0.1.21/htmlc/utils.py
import os import re def camel_case_to_snake(text): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', text) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() def camel_case_to_hyphenated(text): """" CamelCase -> camel-case """ s1 = re.sub('(.)([A-Z][a-z]+)', r'\1-\2', text) return re.sub('...
PypiClean
/CountryGoogleScraper-0.2.10.tar.gz/CountryGoogleScraper-0.2.10/GoogleScraper/search_engine_parameters.py
Some good stuff: http://www.blueglass.com/blog/google-search-url-parameters-query-string-anatomy/ http://www.rankpanel.com/blog/google-search-parameters/ http://lifehacker.com/5933248/avoid-getting-redirected-to-country-specific-versions-of-google All search requests must include the parameters site, clie...
PypiClean
/Maxar_OGC_SDK-0.1.tar.gz/Maxar_OGC_SDK-0.1/Maxar_OGC_SDK/wfs.py
import requests import ogc.process as process class WFS: def __init__(self, session): self.base_url = session['base_url'] + "catalogservice/wfsaccess" self.headers = session['headers'] self.connect_id = session['connectid'] self.response = None self.querystring = self._init...
PypiClean
/McStasScript-0.0.63.tar.gz/McStasScript-0.0.63/mcstasscript/data/data.py
import matplotlib.pyplot import numpy as np import copy class McStasMetaData: """ Class for holding metadata for McStas dataset, is to be read from mccode.sim file. Attributes ---------- info : dict Contains read strings from mccode.sim in key, value dimension : Int or List of In...
PypiClean
/OTLModel/Classes/Onderdeel/LEDDriver.py
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.ImplementatieElement.AIMObject import AIMObject from OTLMOW.OTLModel.Datatypes.KlLEDDriverMerk import KlLEDDriverMerk from OTLMOW.OTLModel.Datatypes.KlLEDDriverModelnaam import KlLEDDriverModelnaam from OTLMOW.OTLModel.Dataty...
PypiClean
/AWS-Client-Wrappers-0.0.1.tar.gz/AWS-Client-Wrappers-0.0.1/aws/s3.py
from typing import Optional import boto3 import botocore from aws.base import AWSClientBase AWSS3_PUBLIC_URL = 'https://s3-{}.amazonaws.com/{}/{}' class S3Client(AWSClientBase): def __init__(self): super().__init__() self.client = self.session.client('s3') self.llclient = boto3.client(...
PypiClean
/MySQL-python-embedded-1.2.7.tar.gz/MySQL-python-embedded-1.2.7/doc/MySQLdb.constants.rst
constants Package ================= :mod:`constants` Package ------------------------ .. automodule:: MySQLdb.constants :members: :undoc-members: :show-inheritance: :mod:`CLIENT` Module -------------------- .. automodule:: MySQLdb.constants.CLIENT :members: :undoc-members: :show-inheritance:...
PypiClean
/Glances-3.4.0.3.tar.gz/Glances-3.4.0.3/glances/stats_client_snmp.py
import re from glances.stats import GlancesStats from glances.compat import iteritems from glances.logger import logger # SNMP OID regexp pattern to short system name dict oid_to_short_system_name = { '.*Linux.*': 'linux', '.*Darwin.*': 'mac', '.*BSD.*': 'bsd', '.*Windows.*': 'windows', '.*Cisco.*...
PypiClean
/CellProfiler-4.2.6.tar.gz/CellProfiler-4.2.6/cellprofiler/data/help/other_3d_identify.rst
How to replicate the Identify modules on volumetric images ========================================================== Checkout the `3D-monolayer tutorial`_ for a step by step 3D pipeline example. **Prepare** images by applying some/all of the these modules: - *Resize* module: Processing 3D images requires much more ...
PypiClean
/Canto-curses-0.9.9.tar.gz/Canto-curses-0.9.9/canto_curses/html.py
from html.parser import HTMLParser import html.entities import re from .color import cc import logging log = logging.getLogger("HTML") class CantoHTML(HTMLParser): # Reset is used, instead of __init__ so a single # instance of the class can parse multiple HTML # fragments. def reset(self): ...
PypiClean
/MagnetiCalc-1.15.2.tar.gz/MagnetiCalc-1.15.2/magneticalc/Validatable.py
# ISC License # # Copyright (c) 2020–2022, Paul Wilhelm, M. Sc. <anfrage@paulwilhelm.de> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # TH...
PypiClean
/Bitdesc-0.1.4.tar.gz/Bitdesc-0.1.4/src/ClassBit.py
import warnings warnings.filterwarnings("ignore", category=FutureWarning) import numpy as np from BiT import taxonomy as taxo from BiT import biodiversity as bio from Channel_Split import concat_features_extract_measures as extract from Channel_Split import concat_features_extract_measures_normalized as normalized_extr...
PypiClean
/Attitude-0.5.0.tar.gz/Attitude-0.5.0/attitude/display/plot/__init__.py
from __future__ import division import matplotlib from mplstereonet.stereonet_math import line, pole import numpy as N from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.patches import Polygon from matplotlib.gridspec import GridSpec from mat...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/br/management/commands/backup.py
import json import os import time import shutil import requests import re import logging from .utils import utils from requests.auth import HTTPBasicAuth from xmltodict import parse as parse_xml from urllib.parse import urlparse, urljoin from django.conf import settings from django.core.management import call_comma...
PypiClean
/parts/Clothing/BlazerSweater.py
def BlazerSweater(color): return ( '<path fill-rule="evenodd" clip-rule="evenodd"' ' d="M132 57.0517C146.912 57.0517 159 45.8588 159 32.0517C159 31.0365 158.935 30.0353 158.808 29.0517H160C199.764 29.0517 232 61.2872 232 101.052V110H32V101.052C32 61.2873 64.2355 29.0517 104 29.0517L105.192 29.051...
PypiClean
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/extern/pygments/lexers/hdl.py
import re from pygments.lexer import RegexLexer, include, bygroups from pygments.token import \ Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, \ Error __all__ = ['VerilogLexer'] class VerilogLexer(RegexLexer): """ For verilog source code with preprocessor directives. *Ne...
PypiClean
/Gizela-1.0.18.tar.gz/Gizela-1.0.18/gizela/data/point_text_table.py
from gizela.text.TextTable import TextTable # text tables for PointGeodetic def geo_coor_table(): return TextTable(\ [("id","%12s"),\ ("lat (deg)","%13.9f"),\ ("lon (deg)","%14.9f"),\ ("height (m)","%8.3f")],\ type="plain") # text tables for PointCart* points def co...
PypiClean
/FX-Manager-1.0.16.tar.gz/FX-Manager-1.0.16/README.md
# FX-Manager <p align="center"> <img src="https://github.com/AbdullahBahi/fx-manager/blob/main/docs/assets/mini_logo.png?raw=true"/> </p> FX-Manager is a python package for developing and testing forex algorithmic trading strategies. ## Contents - [**Features**](https://github.com/AbdullahBahi/FX-Manager#Featur...
PypiClean
/Funz-1.15.post0-py3-none-any.whl/Funz-1.15.post0.data/scripts/calculator.py
import sys, subprocess, signal from .inst.Funz.Funz import * from Funz import FUNZ_HOME def Grid(): """ Display Funz grid @return Funz grid status @export @examples \dontrun{ Grid() # ..Will display no calculator # This will start 5 instances of calculator (waiting for a "Run()" call) ...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/generic/migrations/0001_initial.py
from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("sites", "0001_initial"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("django_comments", "__first__"), ("contenttypes", "0001_initial"...
PypiClean
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/passes/create_graph.py
import manager import ensure_info from ..utils.multi_visitor import VisitorFactory, NF_ELSE from .. import query_graph _delay_import_(globals(),"..repops") class CreateGraph(VisitorFactory(prefixes=("visit",), flags=NF_ELSE), manager.Pass): after=set([ensure_info.EnsureInfo]...
PypiClean
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/market/futures.py
import os import pandas as pd from ultron.env import g_base_path from ultron.ump.core.base import FreezeAttrMixin from ultron.ump.core import env from ultron.kdutils.lazy import LazyFunc from ultron.kdutils.decorator import singleton from ultron.ump.market.symbol import Symbol """国内期货symbol文件,文件定期重新爬取,更新""" _stock_co...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js
MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["MathJax_Math-italic"]={directory:"Math/Italic",family:"MathJax_Math",style:"italic",testString:"MathJax Math \u03A5",skew:{65:0.139,66:0.0833,67:0.0833,68:0.0556,69:0.0833,70:0.0833,71:0.0833,72:0.0556,73:0.111,74:0.167,75:0.0556,76:0.0278,77:0.0833,78:0.0833,79:0.0833,80:0...
PypiClean
/Caroline-presentation-0.2.4.tar.gz/Caroline-presentation-0.2.4/caroline/html_dist/js/mathjax/input/tex/extensions/newcommand.js
!function(a){var n={};function r(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=a,r.c=n,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
PypiClean
/OSF_EIMTC-0.1.46.tar.gz/OSF_EIMTC-0.1.46/src/EIMTC/third_party/tshark/stats.py
import numpy as np import math class Stats: # INTERFACE def average(self): pass def median(self): pass def mode(self): pass def variance(self): pass def std_deviation(self): pass def coeff_of_variation(self): pass def skew_from_me...
PypiClean
/ITA-test4-2.1.tar.gz/ITA-test4-2.1/hate_tweet_map/database.py
from typing import List import pymongo import yaml from pymongo import MongoClient class DataBase: """ Class to perform operation on the mongodb collection. This class handle the operation on the collection containing tweets and the operation on the collection containing the users. """ def __i...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/functions/__init__.py
from .combinatorial.factorials import (FallingFactorial, RisingFactorial, binomial, factorial, factorial2, ff, rf, subfactorial) from .combinatorial.numbers import (bell, bernoulli, catalan, euler, fibonacci, ...
PypiClean
/AA_module-1.2.0-py3-none-any.whl/AAM/OAA_class.py
import numpy as np import torch import torch.nn as nn import torch.optim as optim from timeit import default_timer as timer from AAM.AA_result_class import _OAA_result from AAM.loading_bar_class import _loading_bar ########## ORDINAL ARCHETYPAL ANALYSIS CLASS ########## class _OAA: ########## HELPER FUNCTION //...
PypiClean
/CoAPthon3-1.0.2.tar.gz/CoAPthon3-1.0.2/coapthon/utils.py
import binascii import random import string __author__ = 'Giacomo Tanganelli' def str_append_hash(*args): """ Convert each argument to a lower case string, appended, then hash """ ret_hash = "" for i in args: if isinstance(i, (str, int)): ret_hash += str(i).lower() elif isins...
PypiClean
/L1L2Signature-0.2.4.tar.gz/L1L2Signature-0.2.4/doc/sphinxext/numpydoc/numpydoc.py
import os, re, pydoc from docscrape_sphinx import get_doc_object, SphinxDocString from sphinx.util.compat import Directive import inspect def mangle_docstrings(app, what, name, obj, options, lines, reference_offset=[0]): cfg = dict(use_plots=app.config.numpydoc_use_plots, show...
PypiClean
/EHRcorral-0.0.3.tar.gz/EHRcorral-0.0.3/ehrcorral/ehrcorral.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import sys from collections import namedtuple, defaultdict import numpy as np from pylev import damerau_levenshtein try: from collections import Counter except Impo...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/n_cbirths.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 n_cbirths(path): """NCbirths Data from births in North Carolina in 2001 A dataset with ...
PypiClean
/MutagenTagWrapper-0.2.0.tar.gz/MutagenTagWrapper-0.2.0/src/tagwrapper/util.py
from __future__ import annotations import re from typing import Any, Callable, IO from mutagen import flac HEADERS_MIMES_EXTS = { re.compile(b'^\xff\xd8\xff[\xdb\xe0\xee\xe1]'): ('image/jpeg', '.jpg'), re.compile(b'^\x89PNG\r\n\x1a\n'): ('image/png', '.png'), re.compile(b'^\x42\x4d'): ('image/bmp', '.bmp...
PypiClean
/ChemDataExtractor-IDE-1.3.2.tar.gz/ChemDataExtractor-IDE-1.3.2/chemdataextractor/config.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import os from collections import MutableMapping import appdirs import yaml from yaml import SafeLoader def construct_yaml_str(self, node): """Override th...
PypiClean
/NREL_disco-0.4.2-py3-none-any.whl/disco/extensions/upgrade_simulation/upgrade_configuration.py
import logging import os from jade.utils.utils import load_data from disco.pydss.common import ConfigType from disco.extensions.upgrade_simulation.upgrade_inputs import UpgradeInputs from disco.pydss.pydss_configuration_base import PyDssConfigurationBase logger = logging.getLogger(__name__) DEFAULT_UPGRADE_COST_DB...
PypiClean
/APIFlask-2.0.1-py3-none-any.whl/apiflask/scaffold.py
import typing as t from collections.abc import Mapping as ABCMapping from functools import wraps from flask import current_app from flask import jsonify from flask import Response from marshmallow import ValidationError as MarshmallowValidationError from webargs.flaskparser import FlaskParser as BaseFlaskParser from w...
PypiClean
/CommonCrawlJob-0.1.0.tar.gz/CommonCrawlJob-0.1.0/aws/aws.py
from __future__ import print_function import boto from gzip import GzipFile from boto.s3.key import Key from io import BytesIO from builtins import ( # noqa bytes, str, open, super, range, zip, round, input, int, pow, object ) __all__ = [ 'S3Remote', ] class S3Remote(object): def __init__(self, bu...
PypiClean
/Homevee_Dev-0.0.0.0-py3-none-any.whl/Homevee/Functions/gps_data.py
from math import radians, cos, sqrt, atan2, sin from Homevee.Item.Status import * from Homevee.Utils.Database import Database MIN_RETENTION_PERIOD = 5 * 60 * 1000 #5 minuten MAX_DISTANCE = 500 #500 Meter def update_gps(user, time, lat, lng, db): cur = db.cursor() on_location_change(user, int(time),...
PypiClean
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/moe/sharded_moe.py
# DeepSpeed Team """ The file has been adapted from two fairscale files: (1) https://github.com/facebookresearch/fairscale/blob/master/fairscale/nn/moe/moe_layer.py (2) https://github.com/facebookresearch/fairscale/blob/master/fairscale/nn/moe/top2gate.py Git commit hash: 34df606902a240567a0d898037ece55c2f1336cf W...
PypiClean
/EA_framework-2.2.3-py3-none-any.whl/EA_sequential/Recombination.py
from EA_sequential.Population import Population import numpy as np import random class Recombination: def __call__(self): pass class Intermediate(Recombination): """ Creates offspring by taking the average values of the parents """ def __call__(self, parents: Population, offspring: Populatio...
PypiClean
/IcoCube-0.0.1a6.tar.gz/IcoCube-0.0.1a6/ICO3Plugin/Message/ICO3Message.py
import uuid from ICO3Plugin.Message.ICO3MessageHeader import ICO3MessageHeader from ICO3Plugin.Message.ICO3UUID import ICO3UUID from ICO3Utilities.Debug.LogDebug import ICO3Log class ICO3Message: theMessageHeader = None thePayload = None def toByteArray(self): if self.thePayload is None: ...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/nodes/CodeObjectSpecs.py
from nuitka.utils.InstanceCounters import ( counted_del, counted_init, isCountingInstances, ) class CodeObjectSpec(object): # One attribute for each code object aspect, and even flags, # pylint: disable=too-many-arguments,too-many-instance-attributes __slots__ = ( "co_name", "c...
PypiClean
/JParsing/JestingAST.py
from abc import ABC, abstractmethod operations = {"+","-","*","/","&","=",'>','NOT','AND','OR', "u-"} class Node(ABC): def __init__(self): self.children = {} @abstractmethod def accept(self, visitor): pass @abstractmethod def volatile(self): pass class SimpleValueNode(N...
PypiClean
/Algebra2x-0.1-py3-none-any.whl/algebra2x/ops/mul.py
from .. import _dispatch from ..algebra import proven, new, Element, Zero, One, Wrapped, Join from ..util import identical __all__ = ["Scaled", "Product"] class Scaled(Wrapped): """Scaled element. Args: e (:class:`.algebra.Element`): Element to scale. scale (tensor): Scale. """ def ...
PypiClean
/Kerko-1.0.0-py3-none-any.whl/kerko/jinja2.py
from __future__ import annotations import re import typing from urllib.parse import urlparse from jinja2 import pass_eval_context from markupsafe import Markup from w3lib.url import safe_url_string from kerko.datetime import format_datetime, reformat_date if typing.TYPE_CHECKING: from flask.blueprints import Bl...
PypiClean
/FrenchLefffLemmatizer-0.3.tar.gz/FrenchLefffLemmatizer-0.3/README.md
# French LEFFF Lemmatizer ### Introduction A French Lemmatizer in Python based on the LEFFF (Lexique des Formes Fléchies du Français / Lexicon of French inflected forms) is a large-scale morphological and syntactic lexicon for French. A lemmatizer retrurns the lemma or more simply the dictionary entry of a word, In F...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/core/files/images.py
import struct import zlib from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ @property def width(self): return self._get_image_dimensions()[0] @prope...
PypiClean
/BlackLager-1.0.14.tar.gz/BlackLager-1.0.14/blackLager/textpad.py
from client_utils import error_handler import curses from datetime import datetime import time import traceback class TextPad(object): # use this as a virtual notepad # write a large amount of data to it, then display a section of it on the screen # to have a border, use another window with a border d...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/build_scripts/ExonAnalyze_module.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
/DI_engine-0.4.9-py3-none-any.whl/ding/policy/policy_factory.py
from typing import Dict, Any, Callable from collections import namedtuple from easydict import EasyDict import torch from ding.torch_utils import to_device import gym class PolicyFactory: r""" Overview: Pure random policy. Only used for initial sample collecting if `cfg.policy.random_collect_size` > ...
PypiClean
/NREL_disco-0.4.2-py3-none-any.whl/disco/utils/custom_type.py
from jade.utils.utils import interpret_datetime class CustomType: """Custom type class allows for additional types outside of str, float, int, etc""" CUSTOM_TYPES = [ 'percent', 'float', 'int', 'str', 'list', 'dict', 'bool', 'datetime', ] ...
PypiClean
/Flask-TemplateSupport-2.0.1.tar.gz/Flask-TemplateSupport-2.0.1/flask_template_support/template_support.py
from flask_template_support import DEFAULT_FILTERS, DEFAULT_FUNCTIONS class TemplateSupport: def __init__(self, app=None, **kwargs): """ :param app: """ self._app = app if self._app: self.init_app(app, **kwargs) def init_app(self, app, filters=None, functi...
PypiClean
/EjabberdAPI-0.1.7.1-py3-none-any.whl/ejabberdapi/Ejabberdapi.py
import os import os.path import requests import getpass from collections import OrderedDict ### # Dict helper class. # Defined at top level so it can be pickled. ### class AttribAccessDict(dict): def __getattr__(self, attr): if attr in self: return self[attr] else: raise Att...
PypiClean
/Flask-SSS-0.1.0.tar.gz/Flask-SSS-0.1.0/README.md
# Flask-SSS Server-Side Sessions for Flask implemented as a SessionInterface. ## Data model The user_id field allows for users to either list their open sessions and close other sessions they have open. It also enables administrators to log out all sessions for a user that needs to be suspended or deleted. ## Usag...
PypiClean
/Aries-core-0.1.330.tar.gz/Aries-core-0.1.330/Aries/docker.py
import requests import re import logging from .web import WebAPI logger = logging.getLogger(__name__) class DockerAPI(WebAPI): def __init__(self, hostname): super().__init__("https://%s" % hostname) def check_version(self, endpoint="/v2/"): """Checks the API version by sending GET request to ...
PypiClean
/CIMAP-1.1.0.tar.gz/CIMAP-1.1.0/LICENSE.md
## MIT License Copyright (c) 2022 Gregorio Dotti 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,...
PypiClean
/Flask-KQMaps-0.4.2.tar.gz/Flask-KQMaps-0.4.2/flask_kqmaps/static/kqwebclient/leaflet/3rd_libs/leaflet.draw/leaflet.draw-src.js
(function (window, document, undefined) {/** * Leaflet.draw assumes that you have already included the Leaflet library. */ L.drawVersion = "1.0.4"; /** * @class L.Draw * @aka Draw * * * To add the draw toolbar set the option drawControl: true in the map options. * * @example * ```js * var map = L.map('m...
PypiClean
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imreconstruct/view/WatcherFrame.py
from qtpy import QtCore, QtWidgets from imswitch.imcontrol.view import guitools import os class WatcherFrame(QtWidgets.QFrame): """Frame for reconstructing files from a folder automatically.""" sigWatchChanged = QtCore.Signal(bool) # (enabled) sigChangeFolder = QtCore.Signal() def __init__(self, *...
PypiClean
/Hector_Observations_Pipeline-1.4-py3-none-any.whl/hop/tiling/tiling_functions.py
import numpy as np import scipy.spatial.distance as dist import itertools import matplotlib.pyplot as plt import pandas as pd import os from operator import itemgetter import warnings from ..hexabundle_allocation.hector import constants as hector_constants # Set up the logging import logging logger = logging.getLogger...
PypiClean
/HuobiPoolApi-0.0.6.tar.gz/HuobiPoolApi-0.0.6/README.md
### HuobiPoolApi [Official Documentation](https://huobiapi.github.io/docs/spot/) [Github repository](https://github.com/inkviz96/huobi_api_python) Get user accounts list ```python from huobi_api.client import Client cl = Client(access_api_key='knt3juterjg45', secret_key='fdwr42rwefsw3r1') cl.get_accounts() ``` Withd...
PypiClean
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-vim.min.js
Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,"function":/\w+(?=\()/,keyword:/\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright...
PypiClean
/Jepy-1.0.0.tar.gz/Jepy-1.0.0/jepy/jepy.py
import warnings from datetime import datetime from dicttoxml import dicttoxml from xml.dom.minidom import parseString from quick_rest import Client, JWTClient, ServerResponse from jepy.jepy_exceptions import ArgumentError, ServerError from typing import Any, Union from requests.models import Response class JepyServe...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/mezzanine/tinymce/langs/it.js
tinymce.addI18n('it',{ "Cut": "Taglia", "Heading 5": "Intestazione 5", "Header 2": "Header 2", "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appunti. Per favore usa i tasti di scelta rapida Ctr...
PypiClean
/KD_Lib-0.0.32.tar.gz/KD_Lib-0.0.32/KD_Lib/KD/vision/teacher_free/virtual_teacher.py
from copy import deepcopy import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.tensorboard import SummaryWriter class VirtualTeacher: """ Implementation of the virtual teacher kowledge distillation framework from the p...
PypiClean
/Flask-Continuum-0.1.7.tar.gz/Flask-Continuum-0.1.7/flask_continuum/plugin.py
# imports # ------- from flask import Flask, appcontext_pushed from flask.globals import _app_ctx_stack, _request_ctx_stack from sqlalchemy_continuum.plugins import FlaskPlugin from sqlalchemy_continuum import make_versioned from sqlalchemy.orm import configure_mappers from sqlalchemy import event # helpers # -----...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/plugins/tools/Zoom.js.uncompressed.js
define("dojox/drawing/plugins/tools/Zoom", ["dijit","dojo","dojox","dojo/require!dojox/drawing/plugins/_Plugin"], function(dijit,dojo,dojox){ dojo.provide("dojox.drawing.plugins.tools.Zoom"); dojo.require("dojox.drawing.plugins._Plugin"); (function(){ // // zoomInc: Float // The amount of zoom that will occur upo...
PypiClean
/Flask_OpenAPI3_UI-1.6.0-py3-none-any.whl/flask_openapi/ui2/static/lang/fr.js
'use strict'; /* jshint quotmark: double */ window.SwaggerTranslator.learn({ "Warning: Deprecated":"Avertissement : Obsolète", "Implementation Notes":"Notes d'implémentation", "Response Class":"Classe de la réponse", "Status":"Statut", "Parameters":"Paramètres", "Parameter":"Paramètre", "Va...
PypiClean
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/kdvs/contrib/dataset_generation.py
# This code is written by Salvatore Masecchia <salvatore.masecchia@unige.it> # and Annalisa Barla <annalisa.barla@unige.it> # Copyright (C) 2010 SlipGURU - # Statistical Learning and Image Processing Genoa University Research Group # Via Dodecaneso, 35 - 16146 Genova, ITALY. # # This file is part of L1L2Py. # # L1L2Py...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/select.js
module.exports = /******/ (function (modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in ...
PypiClean
/AirzoneCloudfix-0.5.0.1.tar.gz/AirzoneCloudfix-0.5.0.1/AirzoneCloud/AirzoneCloud.py
import json import logging import pprint import requests import urllib import urllib.parse from .contants import ( API_LOGIN, API_SITES, API_ZONES, API_ZONE, API_EVENTS, ) from .Site import Site _LOGGER = logging.getLogger(__name__) class AirzoneCloud: """Allow to connect to AirzoneCloud AP...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/ntheory/continued_fraction.py
from ..core import Integer, Rational def continued_fraction_periodic(p, q, d=0): r"""Find the periodic continued fraction expansion. Compute the continued fraction expansion of a rational or a quadratic surd, i.e. `\frac{p + \sqrt{d}}{q}`, where `p`, `q` and `d \ge 0` are integers. Returns =...
PypiClean
/MTGA-0.9.5-py3-none-any.whl/mtga/set_data/dynamic.py
import json import os import re import sys from pathlib import Path from mtga.models.card import Card from mtga.models.card_set import Set def _get_data_location_hardcoded(): root = os.environ.get( "ProgramFiles", r"C:\Program Files" ) return os.path.join(root, "Wizards of the Coast", "MTG...
PypiClean
/FrAG-1.1.0.tar.gz/FrAG-1.1.0/frag_pele/PlopRotTemp_S_2017/template/templateBuilder.py
import subprocess import __future__ import os import shutil import re import warnings from schrodinger import structure from frag_pele.PlopRotTemp_S_2017.template.chargeHandler import ChargeHandler from itertools import groupby try: from PlopRotTemp.PlopRotTemp import preproces_file_lines, find_bonds_in_mae, find_...
PypiClean
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/structural_response.py
import KratosMultiphysics from KratosMultiphysics import Parameters, Logger from KratosMultiphysics.response_functions.response_function_interface import ResponseFunctionInterface import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication from KratosMultiphysics.StructuralMechanicsApplic...
PypiClean
/Gato-1.2.7.tar.gz/Gato-1.2.7/GatoSystemConfiguration.py
import os import os.path import shutil import sys import string import re import Tkinter import tkSimpleDialog import tkFileDialog import traceback import logging try: import _winreg except ImportError: # we are not on a windows system pass gatoMimeType="application/gato" gatoFileExtension="gato" ...
PypiClean
/FastMSA-0.3.3.tar.gz/FastMSA-0.3.3/fastmsa/schema.py
import collections from dataclasses import Field as DataClassField from inspect import getmembers from types import GenericAlias from typing import Any, Callable, Optional, Type, TypeVar, Union, cast from pydantic import BaseModel, Field # noqa from pydantic.fields import FieldInfo # noqa from pydantic.main import M...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/ding/utils/data/structure/cache.py
import time from queue import Queue from threading import Thread from typing import Any from ding.utils import LockContext, LockContextType class Cache: r""" Overview: Data cache for reducing concurrent pressure, with timeout and full queue eject mechanism Interface: __init__, push_data, ...
PypiClean
/CMinx-1.1.9.tar.gz/CMinx-1.1.9/src/cminx/parser/__init__.py
import logging from antlr4 import Parser, DFA from antlr4.atn.ATNConfigSet import ATNConfigSet from antlr4.error.ErrorListener import ErrorListener class CMakeSyntaxError(SyntaxError): pass class ParserErrorListener(ErrorListener): """ Listens for parser errors and raises exceptions when they occur. ...
PypiClean
/GaussianBinomial_dist-0.1.tar.gz/GaussianBinomial_dist-0.1/distributions/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