id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Cola-0.1.0b0.tar.gz/Cola-0.1.0b0/cola/functions/budget.py
import os import threading try: import cPickle as pickle except ImportError: import pickle from cola.core.utils import get_rpc_prefix from cola.core.rpc import client_call FUNC_PREFIX = "budget_apply_" SUFFICIENT, NOAPPLIED, ALLFINISHED = range(3) DEFAULT_BUDGETS = 3 BUDGET_APPLY_STATUS_FILENAME = 'budget.ap...
PypiClean
/DevContest-0.4.tar.gz/DevContest-0.4/devcontest/public/jsmath/jsMath-BaKoMa-fonts.js
* * The BaKoMa fonts have a different encoding, so change the characters * to correspond to the their encoding. */ if (jsMath.browser == "Mozilla" && jsMath.platform != "mac") { /* * Mozilla/PC */ jsMath.Update.TeXfontCodes({ cmr10: [ 'Γ', 'Δ', 'Θ', 'Λ', '&...
PypiClean
/edward-1.3.5.tar.gz/edward-1.3.5/edward/criticisms/evaluate.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import six import tensorflow as tf from edward.models import RandomVariable from edward.util import check_data, get_session, compute_multinomial_mode, \ with_binary_averaging try: fro...
PypiClean
/GXBubble-0.1.27.tar.gz/GXBubble-0.1.27/gxbubble/iOSBuild.py
import os import re import shutil import sys import time import subprocess from OpenSSL import crypto from OpenSSL.crypto import load_certificate, FILETYPE_PEM class IOSBuild: def __init__(self,ProjectPath): self.projectPath = ProjectPath; #获取目标目录文件名 def access_filename(cwd_patch,file_suffix): ...
PypiClean
/DijkstraAlgo-0.0.7-py3-none-any.whl/DijkstraAlgo.py
class DijkstraAlgorithm: def __init__(self): '''Initializing the instances''' self.min_dis_index = [] self.short_dis = [] def minDistance(self, dist, queue): minimum = float("Inf") min_index = -1 for i in range(len(dist)): if dist[i] < minimum and ...
PypiClean
/GeophPy-0.32.2.tar.gz/GeophPy-0.32.2/docs/gen-proc.rst
.. _chap-gen-proc-geophpy: General Processing ****************** All the available processing techniques can be apply to a dataset through a simple command line of the form: >>> dataset.ProcessingTechnique(option1=10, option2=True, option3='relative',...) The available `general processing` techniques (i.e. not ...
PypiClean
/LUBEAT-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/automated_ml/_automated_ml.py
# AzureML from azureml.core.experiment import Experiment from azureml.core import Workspace from azureml.train.automl.automlconfig import AutoMLConfig from azureml._base_sdk_common.common import ProjectSystemException from sklearn.multioutput import MultiOutputRegressor # helper imports import time import copy """Aut...
PypiClean
/HTML_Auto-0.0.5-py3-none-any.whl/HTML/Auto.py
import re from struct import unpack __version__='0.0.5' class Tag: def __init__( self, params={} ): self.encode = 1 if 'encode' in params else 0 self.sort = 1 if 'sort' in params else 0 self.level = params['level'] if 'level' in params else 0 ...
PypiClean
/Achoo-1.0.tar.gz/Achoo-1.0/setup/ez_setup.py
import sys DEFAULT_VERSION = "0.6c8" DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] md5_data = { 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', 'setuptools-0.6b2-py2.3.egg': '5657759...
PypiClean
/Homie4-0.4.0.tar.gz/Homie4-0.4.0/homie/mqtt/homie_mqtt_client.py
from homie.mqtt.paho_mqtt_client import PAHO_MQTT_Client #from homie.mqtt.gmqtt_client import GMQTT_Client MQTT_Client = PAHO_MQTT_Client import logging logger = logging.getLogger(__name__) MQTT_SETTINGS = { "MQTT_BROKER": None, "MQTT_PORT": 1883, "MQTT_USERNAME": None, "MQTT_PASSWORD": None, "...
PypiClean
/KolejkaForeman-0.1.202308091427-py3-none-any.whl/kolejka/foreman/foreman.py
from kolejka.common import settings import copy import datetime import dateutil.parser import glob import json import logging import math from multiprocessing import Process import os import pathlib import random import shutil import subprocess import sys import tempfile import traceback from threading import Thread ...
PypiClean
/BotEXBotBase-3.1.3.tar.gz/BotEXBotBase-3.1.3/discord/player.py
import threading import subprocess import audioop import asyncio import logging import shlex import time from .errors import ClientException from .opus import Encoder as OpusEncoder log = logging.getLogger(__name__) __all__ = ["AudioSource", "PCMAudio", "FFmpegPCMAudio", "PCMVolumeTransformer"] class AudioSource: ...
PypiClean
/ERStruct-0.2.1.tar.gz/ERStruct-0.2.1/README.md
# ERstruct - Official Python Implementation A Python package for inferring the number of top informative PCs that capture population structure based on genotype information. ## Requirements for Data File 1. Data files must be of numpy array `.npy` format. Users can convert VCF (variant call format) file in to numpy a...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/maps/migrations/0025_auto_20170801_1228_squashed_0032_auto_20190404_0820.py
from django.db import migrations, models import django.db.models.manager class Migration(migrations.Migration): replaces = [('maps', '0025_auto_20170801_1228'), ('maps', '0026_auto_20180301_1947'), ('maps', '0027_auto_20180302_0430'), ('maps', '0028_auto_20180409_1238'), ('maps', '0029_auto_20180412_0822'), ('...
PypiClean
/django-chuck-0.2.3.tar.gz/django-chuck/modules/django-cms/project/apps/filer/migrations/0005_auto__add_field_file_sha1__chg_field_file_file.py
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'File.sha1' db.add_column('filer_file', 'sha1', self.gf('django.db.models.fields.CharField')(default='', max_...
PypiClean
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/external_event.py
import builtins import datetime from files_sdk.api import Api from files_sdk.list_obj import ListObj from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError class ExternalEvent: default_attributes = { 'id': None, # int64 - Event ID 'event_type': None, ...
PypiClean
/Django-Data-Import-1.0.2.tar.gz/Django-Data-Import-1.0.2/django_data_import/mixins.py
from __future__ import absolute_import from __future__ import with_statement import csv import django from django.utils.translation import ugettext_lazy as _ from django.conf.urls import patterns, url from django.contrib import messages from django.core.urlresolvers import reverse from django.db import IntegrityError f...
PypiClean
/KratosChimeraApplication-9.4-cp38-cp38-win_amd64.whl/KratosMultiphysics/ChimeraApplication/rotate_region_process.py
import KratosMultiphysics import KratosMultiphysics.ChimeraApplication as KratosChimera def Factory(settings, Model): if ( not isinstance(settings, KratosMultiphysics.Parameters) ): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return ApplyRotateRegionProce...
PypiClean
/Copreus-0.4.0.tar.gz/Copreus-0.4.0/copreus/drivers/rgbled.py
import RPi.GPIO as GPIO from copreus.baseclasses.adriver import ADriver from copreus.schema.rgbled import get_schema import json import jsonschema from enum import Enum from asyncscheduler import AsyncScheduler from pelops.ui.tools import parse message_rgb_schema = { "type": "object", "description": "rgb boole...
PypiClean
/FuXi-1.4.production.tar.gz/FuXi-1.4.production/lib/Rete/TopDown.py
import itertools, copy, pickle try: from hashlib import md5 as createDigest except: from md5 import new as createDigest from FuXi.Rete.AlphaNode import ReteToken, AlphaNode from FuXi.Horn.HornRules import Clause, Ruleset, Rule, HornFromN3 from FuXi.Rete.RuleStore import * from FuXi.Rete.Magic import AdornLitera...
PypiClean
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/properties_pages/moveable_graphical_element_properties_editor.py
# General Imports # PyQt6 Imports from PyQt6.QtCore import QCoreApplication, QPointF, QSizeF, Qt, pyqtSlot # Project Imports from muphyn.packages.interface.properties_pages.abstract_properties_editor import AbstractPropertiesEditor from muphyn.packages.interface.properties_pages.rotation_slider import RotationSlider...
PypiClean
/BGT_Client-1.0.2-py3-none-any.whl/dgt_sdk/protobuf/client_heads_pb2.py
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_in...
PypiClean
/GailBot-0.2a0-py3-none-any.whl/gailbot/core/pipeline/pipeline.py
from typing import List, Dict, Any from dataclasses import dataclass from .component import Component, ComponentState, ComponentResult from gailbot.core.utils.threads import ThreadPool from gailbot.core.utils.logger import makelogger import networkx as nx Failure = ComponentResult(ComponentState.FAILED, None, 0) log...
PypiClean
/NlpToolkit-PropBank-1.0.21.tar.gz/NlpToolkit-PropBank-1.0.21/README.md
Turkish PropBank (TRopBank) ============ Turkish PropBank (TRopBank) is a corpus of over 17.000 Turkish verbs, each annotated with their syntactic arguments and thematic roles. Arguments are bits of essential information attached to a verb (such as subject or object), and thematic roles are semantic classifications as...
PypiClean
/FlaskBB-2.0.2.tar.gz/FlaskBB-2.0.2/flaskbb/cli/main.py
import binascii import logging import os import sys import time import traceback from datetime import datetime import click import click_log import requests from celery.bin.celery import CeleryCommand from flask import current_app from flask.cli import FlaskGroup, ScriptInfo, with_appcontext from flask_alembic import ...
PypiClean
/ClusterShell-1.9.1.tar.gz/ClusterShell-1.9.1/doc/sphinx/config.rst
Configuration ============= .. highlight:: ini clush ----- .. _clush-config: clush.conf ^^^^^^^^^^ The following configuration file defines system-wide default values for several ``clush`` tool parameters:: /etc/clustershell/clush.conf ``clush`` settings might then be overridden (globally, or per user) if on...
PypiClean
/MakkaPakka-1.0.4.tar.gz/MakkaPakka-1.0.4/src/makka_pakka/directed_graph/directed_graph.py
from typing import List from makka_pakka.directed_graph.node import Node from makka_pakka.exceptions.exceptions import ErrorType from makka_pakka.exceptions.exceptions import MKPKCyclicDependency from makka_pakka.exceptions.exceptions import MKPKInvalidParameter class DirectedGraph: """ A stripped down imple...
PypiClean
/EpiTator-1.3.5.tar.gz/EpiTator-1.3.5/epitator/importers/import_geonames.py
from __future__ import absolute_import from __future__ import print_function import six import csv import unicodecsv import re import sys from six import BytesIO from zipfile import ZipFile from six.moves.urllib import request from six.moves.urllib.error import URLError from ..get_database_connection import get_databas...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/xmpp/RosterService.js
define(["dijit","dojo","dojox"],function(_1,_2,_3){ _2.provide("dojox.xmpp.RosterService"); _3.xmpp.roster={ADDED:101,CHANGED:102,REMOVED:103}; _2.declare("dojox.xmpp.RosterService",null,{constructor:function(_4){ this.session=_4; },addRosterItem:function(_5,_6,_7){ if(!_5){ throw new Error("Roster::addRosterItem() - U...
PypiClean
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/mode/htmlmixed/htmlmixed.js
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "../x...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/umd/locale/en.js
(function (global, factory) { if (typeof define === "function" && define.amd) { define('element/locale/en', ['module', 'exports'], factory); } else if (typeof exports !== "undefined") { factory(module, exports); } else { var mod = { exports: {} }; factory(...
PypiClean
/Dhelpers-0.1.5rc1.tar.gz/Dhelpers-0.1.5rc1/Dlib/Dpowers/events/hookpower/__init__.py
from .. import Adaptor, adaptionmethod from .baseclasses import CallbackHook, KeyhookBase, ButtonhookBase class HookAdaptor(Adaptor): @adaptionmethod("Keyhook") def keys(self, callback = False, timeout = 60, *, capture = False, reinject_func = None, priority: int = 0, dedicated_thread= ...
PypiClean
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/eval_util.py
"""Common utility functions for evaluation.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import os import re import time import numpy as np from six.moves import range import tensorflow.compat.v1 as tf import tf_slim as slim from ...
PypiClean
/Flask-ShellPlus-0.0.3.tar.gz/Flask-ShellPlus-0.0.3/flask_shellplus/__init__.py
import os import sys import logging from collections import OrderedDict import six from flask import current_app from flask.ext.script import Command, Option from .utils import import_items, get_sa_models __version__ = '0.0.3' class Shell(Command): """ Runs a Python shell inside Flask application context....
PypiClean
/FinPy-0.5.tar.gz/FinPy-0.5/finpy/financial/portfolio.py
import datetime as dt import pandas as pd import numpy as np import random import csv from .order import Order from .fincommon import FinCommon import finpy.utils.fpdateutil as du from finpy.utils import utils as ut from finpy.financial.equity import get_tickdata class Portfolio(): """ Portfolio has three ite...
PypiClean
/MagCalibration_jdickerson80-1.2.0-py3-none-any.whl/magCalibration/scripts/calcStats.py
import os import sys import csv import numpy as np import scipy.stats as st def getDirectory(path, spectra_dir): NWPS_dir = f"{path}{spectra_dir}/avg/10/" file_list = [f for f in os.listdir(NWPS_dir) if f.endswith(".mrc")] num_files = len(file_list) if num_files < 1: NWPS_dir = f"{path}{spectra...
PypiClean
/Curp-1.3.1.tar.gz/Curp-1.3.1/curp/dynamics/integrator.py
from __future__ import print_function # standard modules import os, sys import time import numpy # curp modules topdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if topdir not in sys.path: sys.path.insert(0, topdir) from utility import TimeStore import clog as logger class NEVIntegrator(TimeSto...
PypiClean
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/plugin/tutorial.py
import logging import StringIO import sys from numpy import arange from ..command import Command, Argument, Failure from ..config import Setting from ..interaction import PointRequest, PointResponse from ..util.si import ppSI, split_data_label from . import Plugin from .curve import CurveArgument class TutorialPlug...
PypiClean
/KL_Audit_supportV3.0-1.0-py3-none-any.whl/AuditModule/core/applications/AuditManagementModules.py
from AuditModule.common import AppConstants from AuditModule.util import Logging as LOGG import traceback from datetime import datetime from AuditModule.core.persistences.adaptors.CassandraPersistenceAdaptor import CassandraDButility cassandra_obj = CassandraDButility() Logger = LOGG.get_logger() def audit_logs_modu...
PypiClean
/BlazeForm-0.5.1.tar.gz/BlazeForm-0.5.1/changelog.rst
Changelog ========= 0.5.1 released 2020-10-23 ------------------------- - Fix mutable default argument in tolist (556fcf0_) .. _556fcf0: https://github.com/blazelibs/blazeform/commit/556fcf0 0.5.0 released 2020-07-14 ------------------------- - drop support for python 2 - modernize package setup and CI - support...
PypiClean
/GoogleAppEngineMapReduce-1.9.22.0.tar.gz/GoogleAppEngineMapReduce-1.9.22.0/mapreduce/json_util.py
"""Json related utilities.""" import copy import datetime import logging try: import json except ImportError: import simplejson as json from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.ext import db from google.appengine.ext import ndb # pyl...
PypiClean
/KalaPy-0.4.2.tar.gz/KalaPy-0.4.2/example/wiki/models.py
import os import difflib from docutils.core import publish_parts from jinja2 import Markup from kalapy import db from kalapy.web import url_for class Page(db.Model): name = db.String(size=60, required=True, unique=True) @property def title(self): return self.name.replace('_', ' ') @classme...
PypiClean
/GraphLab_Create-2.1-cp27-none-macosx_10_5_x86_64.macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl/graphlab/toolkits/feature_engineering/_doc_utils.py
import string from ._feature_engineering import Transformer import types import sys def func_copy(f): """ Make a copy of a function using the underlying function attributes. """ if sys.version_info.major == 2: func_code = f.func_code func_globals = f.func_globals func_name = f....
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/sdk.py
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" __doc__ = """Module to detect the Platform/Windows SDK PSDK 2003 R1 is the earliest version detected. """ import os import SCons.Errors import SCons.Util from .common import debug, read_reg # SDK Checks. This is of course a mess as everything else on...
PypiClean
/Boutique_crawling-0.0.1-py3-none-any.whl/JIMMYCHOO.py
import requests import pandas as pd from bs4 import BeautifulSoup import urllib.request import re #가방 def j_bags(): """ JIMMY CHOO 한국 사이트에 접속하여 남자, 여자 가방 항목의 모든 페이지에서 데이터를 가져옵니다. 가져온 데이터를 데이터 프레임의 형태로 바꿔출력해주고, 사진 링크를 이용하여 사진 파일을 다운로드 합니다. 저장 경로를 변경하고 싶을 때에는 urllib.request.urlretrieve(url, 'ba...
PypiClean
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/syntax/_perl.py
__author__ = "Cody Precord <cprecord@editra.org>" __svnid__ = "$Id: _perl.py 66108 2010-11-10 21:04:54Z CJP $" __revision__ = "$Revision: 66108 $" #-----------------------------------------------------------------------------# # Imports import wx import wx.stc as stc # Local Imports import synglob import syndata #--...
PypiClean
/HILO-MPC-1.0.3.tar.gz/HILO-MPC-1.0.3/hilo_mpc/util/data.py
from __future__ import annotations from copy import deepcopy from typing import Optional, Sequence, TypeVar, Union import warnings import casadi as ca import numpy as np from ..modules.base import Base, TimeSeries from ..modules.controller.base import Controller from ..util.util import is_list_like Module = TypeV...
PypiClean
/Frontiersman-2.0.2-py3-none-any.whl/frontiersman/client/CardDiscarder.py
import pygame import pygame_gui as pg_g from frontiersman.client.GuiConstants import CARD_SIZE, SPACING class CardDiscarder: def __init__(self, rect, cards, manager, callback, layer_height, container=None): rect = pygame.Rect(rect.left, rect.top - rect.height, rect.width, rect.height * 2) self.man...
PypiClean
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/README.md
ImageD11 is a python code for identifying individual grains in spotty area detector X-ray diffraction images. Version 1.9.8, Jon Wright, wright@esrf.fr This is the source code for ImageD11. Probably you wanted a compiled version. If your pip is up-to-date, you can try to install it like this (numpy is needed to co...
PypiClean
/Nevow-0.14.5.tar.gz/Nevow-0.14.5/NEWS.rst
Nevow 0.14.4 (2018-06-13) ========================= Bugfixes -------- - Divmod.Runtime.getAttribute now works again on newer Microsoft Edge versions. (#102) Nevow 0.14.3 (2017-07-26) ========================= Bugfixes -------- - Athena will now time requests out client-side rather than waiting forever (up to ...
PypiClean
/F5NoMore-0.1.0.tar.gz/F5NoMore-0.1.0/f5nomore/SimpleWebSocketServer.py
from __future__ import print_function from __future__ import unicode_literals import traceback import hashlib import base64 import socket import struct import ssl import time import sys import errno import logging from select import select from io import BytesIO py3 = (sys.version > '3') if py3: import socketserv...
PypiClean
/BxModels-0.4.0-py3-none-any.whl/bxmodels/bayes/utils.py
import math import torch def log_normal(x, means, covars): """ Computes the log-probability of the given data for multiple multivariate normal distributions defined by their means and covariances. Parameters: ----------- - x: torch.Tensor [N, D] The data to compute the log-probability...
PypiClean
/CloudHummingbird-1.1.0-py3-none-any.whl/Hummingbird/scheduler.py
import json import logging import os import subprocess import sys import time from datetime import datetime, timedelta from typing import List from retry import retry from .errors import SchedulerException from .hummingbird_utils import PLATFORM class Scheduler(object): """Dsub scheduler construction and execu...
PypiClean
/Elpotrero-1.6.2.tar.gz/Elpotrero-1.6.2/elpotrero/_files/tree/scripts/tools/config/installconfigfiles.py
import os import sys import re import logging import elpotrero.lib.files as libfiles import elpotrero.lib.util as elutil import configurationvalues as confvals _logger = None def getconfigurationpath(filelayoutkey, filename): """ Util to get the full path of conf file""" pathfile = os.path.join( co...
PypiClean
/AllyInvestPy-1.0.16.tar.gz/AllyInvestPy-1.0.16/ally/responses/quote.py
class Quote(): def __init__(self): pass def from_xml(self, xml): pass def from_json(self, json): if 'adp_100' in json: self.adp_100 = json['adp_100'] if 'adp_200' in json: self.adp_200 = json['adp_200'] if 'adp_50' in json: self.a...
PypiClean
/BGT_Client-1.0.2-py3-none-any.whl/dgt_sdk/processor/core.py
from concurrent.futures import CancelledError import concurrent.futures import itertools import logging from dgt_sdk.messaging.exceptions import ValidatorConnectionError from dgt_sdk.messaging.future import FutureTimeoutError from dgt_sdk.messaging.stream import RECONNECT_EVENT from dgt_sdk.messaging.stream import S...
PypiClean
/LbNightlyTools-4.0.1-py3-none-any.whl/LbMsg/BuildMsg.py
from __future__ import absolute_import, print_function __author__ = "Ben Couturier <ben.couturier@cern.ch>" import datetime import json import os from .Common import Messenger class NightliesMessenger(Messenger): """ Class used to connect to the NightlyBuilds queue """ def __init__(self): ...
PypiClean
/MySQL-python-1.2.5.zip/MySQL-python-1.2.5/_mysql_exceptions.py
try: from exceptions import Exception, StandardError, Warning except ImportError: # Python 3 StandardError = Exception class MySQLError(StandardError): """Exception related to operation with MySQL.""" class Warning(Warning, MySQLError): """Exception raised for important warnings like data ...
PypiClean
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/dragonflow/db/drivers/redis_db_driver.py
import re from oslo_log import log from redis import client as redis_client from redis import exceptions from dragonflow.common import exceptions as df_exceptions from dragonflow.db import db_api from dragonflow.db.drivers import redis_mgt LOG = log.getLogger(__name__) class RedisDbDriver(db_api.DbApi): Requ...
PypiClean
/MAGINE-0.1.5.tar.gz/MAGINE-0.1.5/magine/mappings/chemical_mapper.py
from bioservices import UniChem import pandas as pd from sortedcontainers import SortedSet, SortedDict from magine.mappings.databases.download_libraries import HMDB try: import cPickle as pickle except: # python3 doesnt have cPickle import pickle try: basestring # Allows isinstance(foo, basestring) to wo...
PypiClean
/AsyncDex-1.1.tar.gz/AsyncDex-1.1/asyncdex/models/author.py
from typing import Any, Dict, Optional, TYPE_CHECKING from .abc import Model from .manga_list import MangaList from .mixins import DatetimeMixin from ..constants import routes from ..utils import DefaultAttrDict, copy_key_to_attribute if TYPE_CHECKING: from ..client import MangadexClient class Author(Model, Dat...
PypiClean
/DynamicForms-0.74.8-py3-none-any.whl/dynamicforms_legacy/mixins/render.py
import uuid as uuid_module from enum import IntEnum from typing import Hashable from rest_framework.fields import Field as DrfField from rest_framework.relations import ManyRelatedField, PKOnlyObject, RelatedField from rest_framework.serializers import ListSerializer from rest_framework.templatetags import rest_framew...
PypiClean
/CompassAI-0.0.3.tar.gz/CompassAI-0.0.3/README.md
# CompassAI CompassAI is a Python library that combines bootstrapping test set, feature importance, fairness evaluation, and model card into one wrapper. It also includes the following model ratings on a scale of 0-100 1. Performance is model performance evaluated on the test set 2. Reliability is the width of 95% bo...
PypiClean
/Maxar_OGC_SDK-0.1.tar.gz/Maxar_OGC_SDK-0.1/Maxar_OGC_SDK/process.py
import os import pyproj import shapely.ops as ops from shapely.geometry.polygon import Polygon from functools import partial import random import string def _response_handler(response): """ Function takes in the server response code and responds accordingly. Returns: requests response object of se...
PypiClean
/MGEdb-1.1.1-py3-none-any.whl/mgedb/validate.py
import logging import re import sys from collections import Counter, defaultdict from typing import Callable import cattr import click from .db import MGEdb, MgeType from .io import parse_db_fasta_header LOG = logging.getLogger(__name__) # Sequence patterns _SEQ_PATTERN = re.compile(r'^[AGCT]+$', flags=re.I) _SEQ_...
PypiClean
/FP-SMC-ALS-test1-0.0.1.tar.gz/FP-SMC-ALS-test1-0.0.1/smc/core/general.py
import collections from smc.base.model import Element from smc.base.util import element_resolver from smc.elements.profiles import DNSRelayProfile from smc.base.structs import NestedDict from smc.policy.interface import InterfacePolicy from smc.api.exceptions import LoadPolicyFailed class SNMP(object): """ SN...
PypiClean
/EggTranslations-1.2.1.tar.gz/EggTranslations-1.2.1/README.txt
======================== EggTranslations Overview ======================== EggTranslations is a flexible object-oriented resource loader that is designed to work in projects that are distributed as `Python eggs`_. Its main goals are to support localization of resources (e.g. images, help files and other documentation)...
PypiClean
/MGP_SDK-1.1.1.tar.gz/MGP_SDK-1.1.1/src/MGP_SDK/OGC_Spec/wmts.py
import requests import MGP_SDK.process as process from MGP_SDK.auth.auth import Auth from pyproj import Transformer import math class WMTS: def __init__(self, auth: Auth, endpoint): self.auth = auth self.version = auth.version self.api_version = auth.api_version self.endpoint = en...
PypiClean
/Mtrax-2.2.07.zip/Mtrax-2.2.07/mtrax/hindsight.py
import numpy as num from params import params import ellipsesk as ell import estconncomps as est import kcluster import matchidentities import pylab as mpl DEBUG = False class MyDictionary(dict): def __init__(self,emptyval=None): self.emptyval = emptyval dict.__init__(self) def __getitem__(se...
PypiClean
/BANGal-0.0.2.tar.gz/BANGal-0.0.2/src/BANG/configuration.py
import yaml from BANG.parameter_search import GalaxyModel import BANG.data as d import numpy as np import cpnest from BANG.data import data from BANG.result_analysis import Result_Analysis from BANG.model_creation import model import matplotlib.pyplot as plt from astropy.cosmology import FlatLambdaCDM import os def ...
PypiClean
/ANYstructure-4.10.tar.gz/ANYstructure-4.10/any_files/pl_stf_window.py
import pathlib import tkinter as tk from _tkinter import TclError from tkinter.ttk import Combobox import os try: import any_files.example_data as test import any_files.helper as hlp except ModuleNotFoundError: import ANYstructure.any_files.example_data as test import ANYstructure.any_files.helper as h...
PypiClean
/GailBot-0.2a0-py3-none-any.whl/gailbot/plugins/loader/directoryloader.py
import os import pip from cryptography.fernet import Fernet from typing import Dict, List, Union, TypedDict, Tuple from dataclasses import dataclass from .pluginLoader import PluginLoader from ..suite import PluginSuite from gailbot.core.utils.logger import makelogger from gailbot.core.utils.general import ( filepa...
PypiClean
/Flask-Turbo-Boost-0.2.8.tar.gz/Flask-Turbo-Boost-0.2.8/flask_turbo_boost/project/application/static/js/prod.js
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHT...
PypiClean
/DataProfiler-0.10.3-py3-none-any.whl/dataprofiler/validators/base_validators.py
"""Build model for dataset by identifying col type along with its respective params.""" from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, cast if TYPE_CHECKING: import dask.dataframe as dd import pandas as pd def is_in_range(x: str | int | float, config: dict) -> bool: ...
PypiClean
/Hocrox-0.3.0.tar.gz/Hocrox-0.3.0/hocrox/layer/save.py
import os import cv2 import numpy as np from hocrox.utils import Layer class Save(Layer): """Save layer saves images on the local filesystem. Here is an example code to use the Save layer in a model. ```python from hocrox.model import Model from hocrox.layer import Read, Save # Initializin...
PypiClean
/CsuPTMD-1.0.12.tar.gz/CsuPTMD-1.0.12/PTMD/maskrcnn_benchmark/apex/apex/amp/utils.py
from . import compat import functools import itertools import torch def is_cuda_enabled(): return torch.version.cuda is not None def get_cuda_version(): return tuple(int(x) for x in torch.version.cuda.split('.')) def is_fp_tensor(x): if is_nested(x): # Fast-fail version of all(is_fp_tensor) ...
PypiClean
/AYABInterface-0.0.9-py3-none-any.whl/AYABInterface-0.0.9.dist-info/DESCRIPTION.rst
AYABInterface ============= .. image:: https://travis-ci.org/fossasia/AYABInterface.svg :target: https://travis-ci.org/fossasia/AYABInterface :alt: Build Status .. image:: https://ci.appveyor.com/api/projects/status/a6yhbt0rqvb212s7?svg=true :target: https://ci.appveyor.com/project/AllYarnsAreBeautiful/AYABI...
PypiClean
/DJModels-0.0.6-py3-none-any.whl/djmodels/utils/version.py
import datetime import functools import os import subprocess import sys from distutils.version import LooseVersion # Private, stable API for detecting the Python version. PYXY means "Python X.Y # or later". So that third-party apps can use these values, each constant # should remain as long as the oldest supported Dja...
PypiClean
/DEWAKSS-1.0.1.tar.gz/DEWAKSS-1.0.1/notebook/DEWAKSS_data.ipynb
``` import pandas as pd import numpy as np pd.set_option('precision',3) np.set_printoptions(precision=3, linewidth=1000) import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns # color_pallet = "muted" color_pallet = "deep" plt.style.use('seaborn-ticks') sns.set_color_codes(color_pallet) plt.rc...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gauges/BarGauge.js
define("dojox/gauges/BarGauge",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/html","dojo/_base/event","dojox/gfx","./_Gauge","./BarLineIndicator","dojo/dom-geometry"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9){ return _1("dojox.gauges.BarGauge",_7,{dataX:5,dataY:5,dataWidth:0,dataHeight:0,_defaultInd...
PypiClean
/CmonCrawl-1.0.3.tar.gz/CmonCrawl-1.0.3/cmoncrawl/common/types.py
from datetime import datetime from enum import Enum from pathlib import Path from typing import Any, Dict, List from urllib.parse import urlparse from dataclasses import dataclass, field from marshmallow import fields from dataclasses_json import dataclass_json, config @dataclass_json @dataclass class DomainRecord: ...
PypiClean
/Bugs%20Everywhere%20(BEurtle%20fork)-1.5.0.1.-2012-07-16-.zip/Bugs Everywhere (BEurtle fork)-1.5.0.1.-2012-07-16-/libbe/bugdir.py
import copy import errno import os import os.path import time import libbe import libbe.storage as storage from libbe.storage.util.properties import Property, doc_property, \ local_property, defaulting_property, checked_property, \ fn_checked_property, cached_property, primed_property, \ change_hook_proper...
PypiClean
/Cooker-1.0.tar.gz/Cooker-1.0/cooker/sites.py
import urllib2 from cooker.util import alert from cooker.parser import HTMLTagsParser class Site(): """ Base class for all sites """ def __init__(self, *args, **kwargs): pass def get_data(self, *args, **kwargs): """Entry point for fetching data from a site """ ur...
PypiClean
/LingTree-0.7.tar.gz/LingTree-0.7/py_src/lingtree/tree.py
from builtins import hex from builtins import str from builtins import object import sys import re atom_pl = re.compile(r"[a-z][a-zA-Z_0-9]*$") unwanted_pl = re.compile(r"([\\'])") def escape_prolog(string): if not string: return "''" if atom_pl.match(string): return string res = unwanted...
PypiClean
/MetaPathways-3.1.6.tar.gz/MetaPathways-3.1.6/metapathways/taxonomy/LCAComputation.py
from __future__ import division try: import sys import traceback import re import gzip import math from metapathways.utils.utils import * from metapathways.utils.metapathways_utils import ( fprintf, printf, GffFileParser, getShortORFId, ) except: pri...
PypiClean
/Clinamen2-2023.5.1.tar.gz/Clinamen2-2023.5.1/clinamen2/cmaes/termination_criterion.py
from abc import ABC, abstractmethod from typing import NamedTuple, Sequence import numpy.typing as npt from clinamen2.cmaes.params_and_state import ( AlgorithmParameters, AlgorithmState, ) class StaleLossState(NamedTuple): """NamedTuple to keep track of the state of a criterion. Args: count...
PypiClean
/Hosein_Tabr-4.7.5.tar.gz/Hosein_Tabr-4.7.5/Hosein_Tabr/Robino.py
from requests import get,post from pyrubika.encryption import encryption from random import randint, choice from Hosein_Tabr.Copyright import copyright class rubino: def __init__(self, auth): self.auth = auth self.print = copyright.CopyRight def _getUrl(): return f'https://rubino{randint(1,30)}.iranlms.ir/' ...
PypiClean
/CoDocParser-0.2.49.tar.gz/CoDocParser-0.2.49/docparser/implements/html_document_parser.py
import os from lxml import etree from docparser.core.document_parser_base import DocumentParserBase class HtmlDocumentParser(DocumentParserBase): """ Html文档解析器 """ def __init__(self, file, configs): """ 初始化 :param file:文件路径 :param configs: 配置 """ self....
PypiClean
/Bitcoin_Price-0.3.tar.gz/Bitcoin_Price-0.3/BitcoinPrice/Bitcoin_Price.py
import requests import time import sys from datetime import datetime def help(): print("Format is : Bitcoin_Price command price") print("The following command is acceptable:") print("\tn : if you do not want to set any bound") print("\tl : if you want to set only Lower Bound.") print("\tu : if you...
PypiClean
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/static/editor/zen.js
(function () { var EditorBase = WLT.Editor.Base; var $window = $(window); var $document = $(document); function ZenEditor() { EditorBase.call(this); $window.scroll(() => { var $loadingNext = $("#loading-next"); var loader = $("#zen-load"); if ($window.scrollTop() >= $document.heigh...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_zh-hk.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": [ "\u4e0a\u5348", "\u4e0b\u5348" ], "DAY": [ "...
PypiClean
/CheatPy-0.0.4.tar.gz/CheatPy-0.0.4/README.md
Example Code: ```py from CheatPy import * import time def MENUCLI(dz:Cheat,cheat1:AddressView,cheat2:AddressView,cheat3: AddressView,cheat4: AddressView,cheat5: AddressView): def ToStr(v: bool): if v: return "ON" else: return "OFF" enable1 = enable2 = e...
PypiClean
/Findex_GUI-0.2.18-py3-none-any.whl/findex_gui/static/js/bootstrap.min.js
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQ...
PypiClean
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/87489.d6fb40ef0db3305f3489.min.js
(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[87489],{87489:function(e){e.exports=function(e){const n="[a-z'][a-zA-Z0-9_']*",i="("+n+":"+n+"|"+n+")",a={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 qu...
PypiClean
/EnvelopesWithSMTPS-0.4.tar.gz/EnvelopesWithSMTPS-0.4/CHANGES.rst
Envelopes Changelog =================== Version 0.4 ----------- Published on 2013-11-10 * Closes `#10 <https://github.com/tomekwojcik/envelopes/issues/10>`_. * Closes `#11 <https://github.com/tomekwojcik/envelopes/issues/11>`_. * Closes `#12 <https://github.com/tomekwojcik/envelopes/issues/12>`_. * Closes `#13 <http...
PypiClean
/Bibtex_File_Comparison_and_Update-1.4.tar.gz/Bibtex_File_Comparison_and_Update-1.4/docs/build/html/_static/doctools.js
* select a different prefix for underscore */ $u = _.noConflict(); /** * make the code below compatible with browsers without * an installed firebug like debugger if (!window.console || !console.firebug) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "...
PypiClean
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/RevitGrids.py
import clr import System # import common library modules import RevitCommonAPI as com import RevitWorksets as rWork import Result as res import Utility as util import RevitFamilyUtils as rFamU # import Autodesk import Autodesk.Revit.DB as rdb clr.ImportExtensions(System.Linq) # ------------------------------------...
PypiClean
/AnyRobot-1.5.4.tar.gz/AnyRobot-1.5.4/aishu/datafaker/profession/entity/port.py
import random import time import requests,json from aishu.public import urlJoin from aishu.public.operationJson import OperetionJson from aishu.setting import header class date(object): def getPort(self): # 系统合法参数 20010-20099、162,514,5140 portList = [port for port in range(20010, 20100)] ...
PypiClean
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/methods/chats/set_chat_photo.py
import os from typing import Union, BinaryIO import pyrogram from pyrogram import raw from pyrogram import utils from pyrogram.file_id import FileType class SetChatPhoto: async def set_chat_photo( self: "pyrogram.Client", chat_id: Union[int, str], *, photo: Union[str, BinaryIO] =...
PypiClean
/ModelicaLanguage-0.0.0a6-py3-none-any.whl/modelicalang/parsers/syntax/_equations.py
__all__ = ( "equation_section", "algorithm_section", "equation", "statement", "if_equation", "if_statement", "for_equation", "for_statement", "for_indices", "for_index", "while_statement", "when_equation", "when_statement", "connect_clause", ) from arpeggio impor...
PypiClean