id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/CherryMusic-0.41.3.tar.gz/CherryMusic-0.41.3/cherrymusicserver/database/sql.py
'''SQL Database handling.''' import os.path import sqlite3 import tempfile import threading from cherrymusicserver import log from cherrymusicserver.database.connect import AbstractConnector, BoundConnector class SQLiteConnector(AbstractConnector): '''Connector for SQLite3 databases. By specification of th...
PypiClean
/MedCodeMap-1.4.tar.gz/MedCodeMap-1.4/MedCode/__init__.py
import os import time from itertools import combinations from pathlib import Path from urllib import request import networkx as nx import pandas as pd __version__ = "1.3" # README README = """ ---------------------------- Help --------------------------- Chaoqi Yang @ UIUC, chaoqiy2@illinois.edu --------------------...
PypiClean
/Ipytools-1.0.0-py3-none-any.whl/Itools/mq/kafka_mq.py
from kafka import KafkaProducer, KafkaConsumer, TopicPartition from kafka.errors import KafkaTimeoutError from .mq import Writer, Reader class KafkaReader(Reader): def __init__(self, options): self.options = options self.consumer = None def get_consumer(self): if self.consumer==None: ...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/docs/blog-importing.rst
======================== Importing External Blogs ======================== Mezzanine has the ability to import blog posts from other blogging platforms using a `Django management command <http://docs.djangoproject.com/en/dev/howto/custom-management-commands/>`_. These are the currently supported formats and their comm...
PypiClean
/GNotifier-0.5.tar.gz/GNotifier-0.5/notifier/xmpp/dispatcher.py
# $Id: dispatcher.py,v 1.42 2007/05/18 23:18:36 normanr Exp $ """ Main xmpppy mechanism. Provides library with methods to assign different handlers to different XMPP stanzas. Contains one tunable attribute: DefaultTimeout (25 seconds by default). It defines time that Dispatcher.SendAndWaitForResponce method will wai...
PypiClean
/BaseBWA-0.4.0.tar.gz/BaseBWA-0.4.0/changelog.rst
Change Log ---------- 0.4.0 released 2016-11-30 ========================= * Fix location of tests to make sure all run * Add support for Python 3 (3.4 and 3.5) * Set up continuous integration testing with CircleCI and AppVeyor * Test coverage is on CodeCov * Remove audit module (has been a separate component, AuditBW...
PypiClean
/CurrencyExchange-1.0.3.tar.gz/CurrencyExchange-1.0.3/README.md
# CurrencyExchange Currency Exchange is a Python package that allows your to verify whether a currency code (such as `USD`) is valid. In addition, it allows you to convert currency amounts to various other currecies. # How to use ``` import CurrencyExchange currency = CurrencyExchange.Currency() currency.convertC...
PypiClean
/OBP_reliability_pillar_4-0.0.14-py3-none-any.whl/OBP_reliability_pillar_4/redshift/redshift_cluster_maintenancesettings_check.py
import logging from botocore.exceptions import ClientError logging.basicConfig(level=logging.INFO) logger = logging.getLogger() # checks compliance for redshift cluster maintenance settings check def redshift_cluster_maintenance_settings_check(self) -> dict: """ :param self: :return: """ logger....
PypiClean
/HAFFET-0.1.2.tar.gz/HAFFET-0.1.2/sdapy/gaussian_process.py
import numpy as np import george, os, emcee from scipy.optimize import least_squares, minimize import matplotlib.pyplot as plt from multiprocessing import Pool from sdapy.filters import central_wavelengths from sdapy.functions import * from sdapy.corner_hack import corner_hack class fit_gp: """Fits data with gaus...
PypiClean
/AI4Water-1.6.tar.gz/AI4Water-1.6/examples/paper/input_data_file_types.ipynb
<a href="https://colab.research.google.com/github/AtrCheema/AI4Water/blob/dev/examples/paper/input_data_file_types.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> This notebook shows how AI4Water can read data f rom different file formats. If the d...
PypiClean
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/mdeditor/bower_components/codemirror/mode/lua/lua.js
CodeMirror.defineMode("lua", function(config, parserConfig) { var indentUnit = config.indentUnit; function prefixRE(words) { return new RegExp("^(?:" + words.join("|") + ")", "i"); } function wordRE(words) { return new RegExp("^(?:" + words.join("|") + ")$", "i"); } var specials = wordRE(parserCon...
PypiClean
/MTfit-1.0.6a5.tar.gz/MTfit-1.0.6a5/docs/source/probability.rst
************************* Probability ************************* :mod:`MTfit` has :term:`PDF` s for two data types, with two different approaches to measuring the polarity. However, it is possible to add :term:`PDF` s for other data-types (see :doc:`extensions`) .. _polarity-pdf-label: .. only:: not latex Pola...
PypiClean
/NehorayRapid-0.0.1-py3-none-any.whl/mmedit/datasets/sr_vimeo90k_dataset.py
import os.path as osp from .base_sr_dataset import BaseSRDataset from .registry import DATASETS @DATASETS.register_module() class SRVimeo90KDataset(BaseSRDataset): """Vimeo90K dataset for video super resolution. The dataset loads several LQ (Low-Quality) frames and a center GT (Ground-Truth) frame. Then...
PypiClean
/Klampt-0.9.0-cp36-cp36m-win_amd64.whl/klampt/vis/backends/qtbackend.py
from OpenGL.GL import * try: from PyQt5 import QtGui from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtOpenGL import * except ImportError: from PyQt4 import QtGui from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtOpenGL import * import sys import math ...
PypiClean
/Create-Python-Project-0.1.0.tar.gz/Create-Python-Project-0.1.0/docs/docs/license.rst
License ======= .. _authors: Authors ------- .. include:: ../../AUTHORS.rst General License Definitions --------------------------- The following section contains the full license texts for Create-Python-Project and the documentation. - "AUTHORS" hereby refers to all the authors listed in the :ref:`authors`...
PypiClean
/MacroPy-1.0.3.zip/MacroPy-1.0.3/macropy/core/exact_src.py
from macropy.core import unparse from macropy.core.macros import injected_vars from ast import * from macropy.core.util import Lazy, distinct, register from walkers import Walker def linear_index(line_lengths, lineno, col_offset): prev_length = sum(line_lengths[:lineno-1]) + lineno-2 out = prev_length + col_o...
PypiClean
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/dns/resolver.py
# Copyright (C) 2003-2017 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND...
PypiClean
/CWR-API-0.0.40.tar.gz/CWR-API-0.0.40/docs/source/validation/validation_process.rst
================== Validation process ================== Once received, the file undergoes a validation process. Three levels of validation are applied: - Transaction level - Record level - Field level The Transaction validation ensures the overall relationship between the records is correct. This checks mainly the...
PypiClean
/Ciw-3.0.0.tar.gz/Ciw-3.0.0/docs/Reference/glossary.rst
.. _glossary: Glossary ======== .. glossary:: arrival The event in which a customer enters a node. arrival distribution The distribution that a node's inter-arrival times are drawn from. blocking Blocking occurs when a customer finishes service and attempts to transition to their destina...
PypiClean
/Dejavu-1.5.0.zip/Dejavu-1.5.0/dejavu/logic.py
from compiler.consts import * import sys from types import CodeType, FunctionType # Globals which assist in unpickling. If they're not present (can't be # imported), that's OK--someone might want to build an app which # doesn't use fixedpoints, for example. import datetime try: import fixedpoint from fixedpoi...
PypiClean
/2feeds-1.0.210-py3-none-any.whl/feeds/utils.py
import queue import threading import feedparser from html.parser import HTMLParser q = queue.Queue() class MLStripper(HTMLParser): def __init__(self): self.reset() self.strict = False self.convert_charrefs = True self.fed = [] def handle_data(self, d): self.fed.append...
PypiClean
/MsgJimPyClient-1.1.3-py3-none-any.whl/client/common/proj_decorators.py
import sys import logging import traceback import socket def func_to_log(func): """Декоратор, выполняющий логирование вызовов функций. Сохраняет события типа debug, содержащие информацию о имени вызываемой функиции, параметры с которыми вызывается функция, и модуль, вызывающий функцию. """ if ...
PypiClean
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/mixed/architectures/self_attention_network/self_attention_modules/functions/aggregation_zeropad.py
__author__ = "heider" __doc__ = r""" Created on 26/01/2022 """ import torch from torch.autograd import Function from torch.nn.modules.utils import _pair from .self_attention_utilities import ( CUDA_NUM_THREADS, Stream, get_blocks_, get_dtype_str, kernel_loop, load_kerne...
PypiClean
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/quick_spec/src/viewers/quick_spec.py
import numpy as np import matplotlib.pyplot as plt import weakref import pandas as pd import sys import traceback import io from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt, pyqtSlot, QPoint, QEvent, pyqtSignal from PyQt5.QtGui import QPalette from PyQt5 import QtGui from PyQt5 import uic from matplotlib.b...
PypiClean
/Comet-3.1.0.tar.gz/Comet-3.1.0/comet/protocol/sender.py
# Twisted protocol definition from twisted.internet.protocol import ClientFactory # Comet protocol definitions from comet.protocol.base import ElementSender # Comet utility routines import comet.log as log from comet.utility import xml_document, ParseError __all__ = ["VOEventSenderFactory"] class VOEventSender(Ele...
PypiClean
/HySpec-0.1.4.4.tar.gz/HySpec-0.1.4.4/spectralAdv/specTools.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib from mpl_toolkits.mplot3d import Axes3D import random from spectral import * import csv import os import timeit from os import listdir from os.path import isfile, join from distutils.dir_util import copy_tree from PIL import Image...
PypiClean
/ISYlib-0.1.20150912c.tar.gz/ISYlib-0.1.20150912c/ISY/_isyprog.py
from ISY.IsyExceptionClass import IsyInvalidCmdError, IsyResponseError from ISY.IsyProgramClass import IsyProgram import xml.etree.ElementTree as ET from warnings import warn ## ## ISY Programs Code ## def load_prog(self, progid=None): """ Load Program status and Info args : none internal funct...
PypiClean
/LTTL-2.0.12.zip/LTTL-2.0.12/README.rst
LangTech Text Library (LTTL) ============================ LTTL is an open-source python package for text processing and analysis. LTTL consists of: (i) a set of classes for representing segmental analyses of text strings (= "segmentations"), whereby portions of text strings are delineated and possibly annotated wit...
PypiClean
/Flask-Bootstraps-3.3.7.8.tar.gz/Flask-Bootstraps-3.3.7.8/flask_bootstraps/nav.py
from hashlib import sha1 from dominate import tags from visitor import Visitor class BootstrapRenderer(Visitor): def __init__(self, html5=True, id=None): self.html5 = html5 self._in_dropdown = False self.id = id def visit_Navbar(self, node): # create a navbar id that is somewh...
PypiClean
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/tokenizer/tokenization_t5.py
import logging import os from shutil import copyfile import regex as re import sentencepiece as spm from .build import TOKENIZER_REGISTRY from .tokenization_base import PreTrainedTokenizer logger = logging.getLogger(__name__) VOCAB_FILES_NAMES = {"vocab_file": "spiece.model"} PRETRAINED_VOCAB_FILES_MAP = { "vo...
PypiClean
/AutoTorch-0.0.2b20200818.tar.gz/AutoTorch-0.0.2b20200818/autotorch/scheduler/remote/remote_manager.py
import os import socket import logging import multiprocessing as mp from .remote import Remote from ...utils import warning_filter __all__ = ['RemoteManager'] logger = logging.getLogger(__name__) def get_ip(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: # doesn't even have to be reach...
PypiClean
/Gaussian_and_Binomial_Distribution-1.2.tar.gz/Gaussian_and_Binomial_Distribution-1.2/Gaussian_and_Binomial_Distribution/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
/CDS-1.0.1.tar.gz/CDS-1.0.1/cds/modules/migrator/cli.py
"""Migration CLI.""" from __future__ import absolute_import, print_function import json import warnings import click from flask import current_app from flask.cli import with_appcontext from invenio_db import db from invenio_migrator.cli import _loadrecord, dumps from invenio_pidstore.errors import PIDAlreadyExists f...
PypiClean
/E.S.P.-Hadouken-0.2.1.tar.gz/E.S.P.-Hadouken-0.2.1/esp_hadouken/ending/name_prompt/NamePrompt.py
from pygame import Surface, Color from pygame.locals import * from esp_hadouken.GameChild import * from Cell import * class NamePrompt(GameChild, Surface): cell_count = 3 transparent_color = Color("brown") def __init__(self, parent): GameChild.__init__(self, parent) self.init_surface() ...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/grid/enhanced/plugins/filter/FilterBar.js
define("dojox/grid/enhanced/plugins/filter/FilterBar",["dojo/_base/declare","dojo/_base/array","dojo/_base/connect","dojo/_base/lang","dojo/_base/sniff","dojo/_base/event","dojo/_base/html","dojo/_base/window","dojo/cache","dojo/query","dijit/_Widget","dijit/_TemplatedMixin","dijit/_WidgetsInTemplateMixin","dojo/fx","d...
PypiClean
/Aston-0.7.1.tar.gz/Aston-0.7.1/aston/tracefile/mzml.py
import re import zlib import base64 from xml.etree import ElementTree as Et import numpy as np from aston import __version__ from aston.trace import Trace from aston.tracefile import ScanListFile from aston.spectra import Scan def t_to_min(x): """ Convert XML 'xs: duration type' to decimal minutes, e.g.: ...
PypiClean
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/docs/api/hyperion.densities.BipolarCavity.rst
================================= hyperion.densities.BipolarCavity ================================= .. currentmodule:: hyperion.densities .. autoclass:: BipolarCavity .. rubric:: Attributes .. autosummary:: ~BipolarCavity.r_0 ~BipolarCavity.theta_0 ~BipolarCavity.rho_0 ~BipolarCavity...
PypiClean
/ADSBibTeX-1.0.9.tar.gz/ADSBibTeX-1.0.9/adsbibtex/adsbibtex.py
import yaml import re import query_ads import adsbibtex_cache import adsbibtex_exceptions def run_adsbibtex(config_file): config_document = load_config_file(config_file) yaml_front_matter, bibcode_lines = parse_config_file(config_document) config = parse_yaml_front_matter(yaml_front_matter) bibcode...
PypiClean
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Environment/BaseEnvironmentConfig.py
from typing import Any, Dict, Optional, Type from os import cpu_count from os.path import join, dirname from threading import Thread from subprocess import run as subprocessRun from sys import modules, executable from DeepPhysX.Core.AsyncSocket.TcpIpServer import TcpIpServer from DeepPhysX.Core.Environment.BaseEnviron...
PypiClean
/GSAS-II-WONDER_osx-1.0.4.tar.gz/GSAS-II-WONDER_osx-1.0.4/GSAS-II-WONDER/defaultIparms.py
#See examples below. defaultIparm_lbl = [] defaultIparms = [] ''' the phrase 'lab data' in the following makes the default goniometer type='Bragg-Brentano' otherwise it is set to 'Debye-Scherrer' ''' defaultIparm_lbl.append('CuKa lab data') defaultIparms.append([ '#GSAS-II instrument parameter file for lab CuK...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/esoph.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 esoph(path): """Smoking, Alcohol and (O)esophageal Cancer Data from a case-control study o...
PypiClean
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/usage_daily_snapshot.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 UsageDailySnapshot: default_attributes = { 'id': None, # int64 - ID of the usage record '...
PypiClean
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/modeling/roi_heads/keypoint_head/keypoint_head.py
import torch from .roi_keypoint_feature_extractors import make_roi_keypoint_feature_extractor from .roi_keypoint_predictors import make_roi_keypoint_predictor from .inference import make_roi_keypoint_post_processor from .loss import make_roi_keypoint_loss_evaluator class ROIKeypointHead(torch.nn.Module): def __i...
PypiClean
/Apycula-0.9.0a1.tar.gz/Apycula-0.9.0a1/apycula/wirenames.py
wirenames = { 0: "A0", 1: "B0", 2: "C0", 3: "D0", 4: "A1", 5: "B1", 6: "C1", 7: "D1", 8: "A2", 9: "B2", 10: "C2", 11: "D2", 12: "A3", 13: "B3", 14: "C3", 15: "D3", 16: "A4", 17: "B4", 18: "C4", 19: "D4", 20: "A5", 21: "B5", 22: "C5", 23: "D5", 24: "A6", 25: "B6", 26: "C6", 27: "D6", 28: "A7", 29: "B7", 30: "C7", 31: "D...
PypiClean
/CBintentBox-0.3.0a3-py3-none-any.whl/intentBox/intent_assistant/collision_detector.py
from intentBox.container import IntentBox from os.path import join from os import listdir, walk class CollisionDetector: def __init__(self, skills_folder, blacklisted_skills=None): self.skills_path = skills_folder self.blacklisted_skills = blacklisted_skills or [] self.box = IntentBox() ...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Lang/zh-CN.js
* Namespace: OpenLayers.Lang["zh-CN"] * Dictionary for Simplified Chinese. Keys for entries are used in calls to * <OpenLayers.Lang.translate>. Entry bodies are normal strings or * strings formatted for use with <OpenLayers.String.format> calls. */ OpenLayers.Lang["zh-CN"] = { 'unhandledRequest': "未...
PypiClean
/HTML_String_Tools-0.2.0-py3-none-any.whl/html_string_tools/html.py
import re import html from . import regex def get_extension(path:str) -> str: """ Returns the extension for a given filename or direct file URL. If extension does not exist, returns empty. :param path: Given path with extension :type path: str, required :return: Extension for the path :rt...
PypiClean
/DEME-0.2.8.tar.gz/DEME-0.2.8/LICENSE.md
Copyright (c) 2021, SBEL GPU Development Team. Copyright (c) 2021, University of Wisconsin - Madison Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice,...
PypiClean
/DragonPyEmulator-0.9.0-py3-none-any.whl/basic_editor/highlighting.py
import tkinter from tkinter import font import pygments from dragonlib.dragon32.pygments_lexer import BasicLexer from pygments.styles import get_style_by_name from basic_editor.editor_base import BaseExtension from basic_editor.tkinter_utils import TkTextTag class TkTextHighlighting(BaseExtension): """ code...
PypiClean
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/integrations/forms.py
from __future__ import annotations from typing import Optional, TYPE_CHECKING from django import forms from django.utils.translation import gettext_lazy as _ from djblets.forms.forms import KeyValueForm if TYPE_CHECKING: from django.http import HttpRequest from djblets.integrations.integration import Integ...
PypiClean
/BenchML-0.3.4.tar.gz/BenchML-0.3.4/benchml/models/mod_logd_ai.py
import numpy as np import benchml.transforms as btf from benchml.hyper import GridHyper, Hyper from benchml.models.common import get_logd_hybrid_topo_gp_kwargs def compile_logd_ai(*args, **kwargs): return [ btf.Module(tag="logd_ai_hybrid_topo_cxlogp_gp", **get_logd_hybrid_topo_gp_kwargs()), btf.M...
PypiClean
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/services/organizer/source/source_manager.py
from typing import List, Dict, Union import os from .source_object import SourceObject from ..settings import SettingObject from gailbot.core.utils.general import get_name, is_file, is_directory, is_path from gailbot.core.utils.logger import makelogger from gailbot.configs import workspace_config_loader OUTPUT_EXTENSI...
PypiClean
/OSD-neo2-0.15.tar.gz/OSD-neo2-0.15/osd_neo2/settings_dialog.py
# Here follows a plea in German to keep the comments in English so # that you may understand them, dear visitor ... # # Meine Kommentare in den Quellcodes sind absichtlich auf Englisch # gehalten, damit Leute, die im Internet nach Lösungen suchen, den # Code nachvollziehen können. Daher bitte ich darum, zusätzliche # ...
PypiClean
/CoAPthon3-1.0.2.tar.gz/CoAPthon3-1.0.2/coapthon/layers/blocklayer.py
import logging from coapthon import defines from coapthon import utils from coapthon.messages.request import Request from coapthon.messages.response import Response logger = logging.getLogger(__name__) __author__ = 'Giacomo Tanganelli' class BlockItem(object): def __init__(self, byte, num, m, size, payload=Non...
PypiClean
/dipex-4.54.5.tar.gz/dipex-4.54.5/integrations/aarhus/payloads.py
from datetime import datetime from typing import Optional from uuid import UUID def create_employee(*, uuid: UUID, name, cpr_no): payload = {"type": "employee", "uuid": str(uuid), "name": name, "cpr_no": cpr_no} return payload def create_engagement( *, uuid: UUID, org_unit_uuid: UUID, perso...
PypiClean
/Flask-GoogleCharts-0.1.0.tar.gz/Flask-GoogleCharts-0.1.0/flask_googlecharts/__init__.py
from jinja2 import Environment, PackageLoader from .utils import render_data import flask import json import pkg_resources import string class GenericChart(object): def __init__(self, name, options=None, data_url=None): # type: (str, dict, str) -> None self.name = name self.options = opt...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/postgres/forms/ranges.py
import warnings from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange from django import forms from django.core import exceptions from django.forms.widgets import MultiWidget from django.utils.deprecation import RemovedInDjango31Warning from django.utils.translation import gettext_lazy as _ __all__ = ...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/ComboBox.js
define("dojox/mobile/ComboBox",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","dojo/dom-geometry","dojo/dom-style","dojo/window","dijit/form/_AutoCompleterMixin","dijit/popup","./_ComboBoxMenu","./TextBox","./sniff"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){ _1.experimental("dojox....
PypiClean
/AtomicP2P-0.0.6.tar.gz/AtomicP2P-0.0.6/atomic_p2p/utils/dns_resolver.py
from typing import Union, Dict, List, Tuple from dns.reversename import from_address from dns.resolver import Resolver, query from ..manager import ThreadManager from ..peer.entity.peer_info import PeerInfo class DNSResolver(object): """A object responsible for keep updating peer info pool from DNS This obje...
PypiClean
/Bot_Externe-0.0.10-py3-none-any.whl/Bot/news.py
import requests import datetime from .config import news_link class ParameterException(Exception): pass class News: def __init__(self, arg: str = "be"): self.__argument = arg self.__date = "&date=" + str(datetime.date.today()) self.__limit = "&limit=1" self.__country = "&coun...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/utils/util_mixins.py
import warnings class NiceRepr: """Inherit from this class and define ``__nice__`` to "nicely" print your objects. Defines ``__str__`` and ``__repr__`` in terms of ``__nice__`` function Classes that inherit from :class:`NiceRepr` should redefine ``__nice__``. If the inheriting class has a ``__len...
PypiClean
/EXtra_geom-1.10.0-py3-none-any.whl/extra_geom/lpd_old.py
import sys from copy import copy from itertools import product from textwrap import indent import h5py import numpy as np def splitChannelDataIntoTiles(channelData, clockwiseOrder=False): """Splits the raw channel data into indiviual tiles Args ---- channelData : ndarray Raw channel data. M...
PypiClean
/Flask-Tus-Ponthe-1.1.4.tar.gz/Flask-Tus-Ponthe-1.1.4/flask_tus_ponthe.py
from flask import request, jsonify, make_response, current_app import base64 import os import redis import uuid # Find the stack on which we want to store the database connection. # Starting with Flask 0.9, the _app_ctx_stack is the correct one, # before that we need to use the _request_ctx_stack. try: from flask ...
PypiClean
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/kdvs/fw/StorageManager.py
r""" Provides functionality for path and subdirectory management. """ from kdvs import SYSTEM_NAME_LC from kdvs.core.db import DBManager from kdvs.core.error import Error from kdvs.core.util import quote import uuid import os import shutil # in future: based on http://code.google.com/p/pyfilesystem/ SUBLOCATION_SEP...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/SpliceMutualEnrich.py
import numpy as np import sys,string import os import os.path from collections import defaultdict try:from stats_scripts import statistics except Exception: import statistics import export; reload(export) import re from stats_scripts import fishers_exact_test import traceback import warnings import math import export ...
PypiClean
/Klarna_API-3.1.0.tar.gz/Klarna_API-3.1.0/klarna/pclass.py
# Copyright 2015 Klarna AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
PypiClean
/CRYSTAL_code_py-2022.12.21-py3-none-any.whl/CRYSTALpy/convert.py
def cry_ase2gui(structure, dimensionality = 3, symmetry = True): # First transform into pmg and then write the gui from pymatgen.io.ase import AseAtomsAdaptor pmg_structure = AseAtomsAdaptor().get_structure(structure) return cry_pmg2gui(pmg_structure, dimensionality=dimensionality, symmetry=symmetry)...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/docs/tutorial/gotchas.rst
========= Gotchas ========= .. >>> init_printing(pretty_print=True, use_unicode=True) Lets recall again, that Diofant is nothing more than a Python library, like :mod:`numpy` or even the Python standard library module :mod:`sys`. What this means is that Diofant does not add anything to the Python language. Lim...
PypiClean
/Memrise-Scraper-0.1.0.tar.gz/Memrise-Scraper-0.1.0/memrise_scraper/memrise.py
COURSE_URL = "/course/977288/korean-grammar-in-use-11/" CARD_COLUMNS = ("col_a", "col_b") import codecs, sys import re import requests from bs4 import BeautifulSoup def lazy_property(fn): """Decorator that makes a property lazy-evaluated. """ attr_name = '_lazy_' + fn.__name__ @property def _laz...
PypiClean
/IOHMM-0.0.7.tar.gz/IOHMM-0.0.7/README.md
# IOHMM A Python package of Input-Output Hidden Markov Model (IOHMM). [![Build Status](https://travis-ci.org/Mogeng/IOHMM.svg?branch=master)](https://travis-ci.org/Mogeng/IOHMM) [![Coverage Status](https://coveralls.io/repos/github/Mogeng/IOHMM/badge.svg)](https://coveralls.io/github/Mogeng/IOHMM) IOHMM extends stan...
PypiClean
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/prototypes/nw_pa/python_anywhere_wsgi.py
# +++++++++++ GENERAL DEBUGGING TIPS +++++++++++ # getting imports and sys.path right can be fiddly! # We've tried to collect some general tips here: # https://help.pythonanywhere.com/pages/DebuggingImportError # +++++++++++ HELLO WORLD +++++++++++ # A little pure-wsgi hello world we've cooked up, just # to prove ev...
PypiClean
/ConsultaCNPJ-0.2.tar.gz/ConsultaCNPJ-0.2/README.md
# Consulta-CNPJ Projeto utilizando API do site 'receitaws' para visualizar algumas informações contidas no CNPJ consultado. Apenas uma aplicação simples utilizando o módulo TKinter para apresentar as informações. [![Build Status](https://travis-ci.org/wherculano/Consulta-CNPJ.svg?branch=master)](https://travis-ci.org...
PypiClean
/Blogmaker-0.6.tar.gz/Blogmaker-0.6/blogmaker/comments/models.py
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.utils.translation import gettext_lazy as _ class CommentManager(models.Manager): def comments_for_object(self, site_id, app_label, model, obj_id, comment_type='comment'):...
PypiClean
/Flaskel-3.1.0rc2-py3-none-any.whl/flaskel/ext/sqlalchemy/model.py
import typing as t from flask_sqlalchemy import Model from vbcore.datastruct import ObjectDict class SQLAModel(Model): __table__ = None def columns(self) -> t.List[str]: if self.__table__ is not None: return list(self.__table__.columns.keys()) return [] @classmethod def ...
PypiClean
/MailGun-V3-0.3.2.tar.gz/MailGun-V3-0.3.2/mailgunv3/__init__.py
from __future__ import unicode_literals import base64 import enum import hashlib import hmac import json import random import requests #from mailgun3 import Mailgun BASE_URL = 'https://api.mailgun.net/v3' class MailGunV3(object): """ This is the only class that should be directly initialized. """ d...
PypiClean
/OPAF-0.9.2.tar.gz/OPAF-0.9.2/opaflib/parser.py
import sys,re import traceback import ply.yacc as yacc from opaflib.lexer import tokens, LexerException # Get the token map from the lexer. This is required. from opaflib.xmlast import create_node, payload, setpayload, expand_span, etree #logging facility import logging #logging.basicConfig(filename='opaf.log',level...
PypiClean
/LWTools-1.0.5.tar.gz/LWTools-1.0.5/LWT/lmtanalysis/BuildEventStop.py
import sqlite3 from time import * from lmtanalysis.Chronometer import Chronometer from lmtanalysis.Animal import * from lmtanalysis.Detection import * from lmtanalysis.Measure import * import matplotlib.pyplot as plt import numpy as np from lmtanalysis.Event import * from lmtanalysis.Measure import * from lmtanalysis.E...
PypiClean
/MishMash-0.3.3.tar.gz/MishMash-0.3.3/docs/usage.rst
======== Usage ======== Configuration ------------- MishMash ships with a default configuration that should work out of the box with no extra additional settings by using a SQLite database saved in ``${HOME}/mishmash.db``. Running ``mishmash info`` with demonstrate this, afterwards ``mishmash.db`` will exist in your...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/trackers/strongsort/utils/json_logger.py
import json from os import makedirs from os.path import exists, join from datetime import datetime class JsonMeta(object): HOURS = 3 MINUTES = 59 SECONDS = 59 PATH_TO_SAVE = 'LOGS' DEFAULT_FILE_NAME = 'remaining' class BaseJsonLogger(object): """ This is the base class that returns __dic...
PypiClean
/Newgram-0.0.5.tar.gz/Newgram-0.0.5/newgram/methods/chats/get_chat.py
from typing import Union import newgram from newgram import raw from newgram import types from newgram import utils class GetChat: async def get_chat( self: "newgram.Client", chat_id: Union[int, str] ) -> Union["types.Chat", "types.ChatPreview"]: """Get up to date information about a...
PypiClean
/hft_crypto_api-1.0.6.tar.gz/hft_crypto_api-1.0.6/hftcryptoapi/bitmart/docs/build/html/_static/doctools.js
"use strict"; const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ "TEXTAREA", "INPUT", "SELECT", "BUTTON", ]); const _ready = (callback) => { if (document.readyState !== "loading") { callback(); } else { document.addEventListener("DOMContentLoaded", callback); } }; /** * Small JavaScript module...
PypiClean
/COAsT-3.2.1.tar.gz/COAsT-3.2.1/README.md
[![PyPI version](https://badge.fury.io/py/COAsT.svg)](https://pypi.org/project/COAsT/#history) [![Anaconda-Server Badge](https://anaconda.org/bodc/coast/badges/latest_release_date.svg)](https://anaconda.org/bodc/coast) [![Anaconda-Server Badge](https://anaconda.org/bodc/coast/badges/version.svg)](https://conda.anaconda...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/manager/Mouse.js
define(["dijit","dojo","dojox"],function(_1,_2,_3){ _2.provide("dojox.drawing.manager.Mouse"); _3.drawing.manager.Mouse=_3.drawing.util.oo.declare(function(_4){ this.util=_4.util; this.keys=_4.keys; this.id=_4.id||this.util.uid("mouse"); this.currentNodeId=""; this.registered={}; },{doublClickSpeed:400,_lastx:0,_lasty:...
PypiClean
/Kamaelia-0.6.0.tar.gz/Kamaelia-0.6.0/Tools/AxonVisualiser.py
import sys from Kamaelia.Visualisation.Axon.AxonVisualiserServer import AxonVisualiserServer from Kamaelia.Visualisation.Axon.AxonVisualiserServer import AxonVisualiserServer, AxonVisualiser, text_to_token_lists from Kamaelia.UI.GraphicDisplay import PygameDisplay from Kamaelia.Util.Introspector import Introspector fr...
PypiClean
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/builtin/calculus.py
from __future__ import unicode_literals from __future__ import absolute_import import six from six.moves import range from six.moves import zip from mathics.builtin.base import Builtin, PostfixOperator, SympyFunction from mathics.core.expression import Expression, Integer, Number from mathics.core.convert import ( ...
PypiClean
/CleverHarold-0.1.tar.gz/CleverHarold-0.1/harold/lib/errordoc.py
# Copyright 2006 The Incorporated Wizzo Widget Works # Distributed under the terms of the GNU General Public License v2 # Author: Troy Melhase <troy@gci.net> ## # # Simple WSGI applications to display HTTP errors and set the resposes # accordingly. # ## from harold.lib import con_type import kid default_template...
PypiClean
/Av_dist_uda-0.1.tar.gz/Av_dist_uda-0.1/distributions_av_dist/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
/NREL_reV-0.8.1-py3-none-any.whl/reV/bespoke/cli_bespoke.py
import pprint import logging from reV.bespoke.bespoke import BespokeWindPlants from reV.utilities import ModuleName from reV.utilities.cli_functions import init_cli_logging from gaps.cli import as_click_command, CLICommandFromClass logger = logging.getLogger(__name__) def _preprocessor(config, job_name, log_direct...
PypiClean
/DLMS_SPODES-0.40.11.tar.gz/DLMS_SPODES-0.40.11/src/DLMS_SPODES/Values/EN/attr_names.py
CHANNEL_COMMUNICATION = "channel_communication" SERIAL_PORT_NAMES = "serial_port_names" CLIENT_NAME = "client_name" LOGICAL_NAME = "logical name" VALUE = "value" CALENDAR_NAME_ACTIVE = "calendar name active" SEASON_PROFILE_ACTIVE = "season profile active" WEEK_PROFILE_TABLE_ACTIVE = "week profile table active" DAY_PRO...
PypiClean
/Attitude-0.5.0.tar.gz/Attitude-0.5.0/attitude/display/lib/attitude.node.js
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var d3$1 = require('d3'); require('d3-selection-multi'); var chroma = _interopDefault(require('chroma-js')); var uuid = _inte...
PypiClean
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/codemirror/mode/css/css.js
CodeMirror.defineMode("css", function(config) { var indentUnit = config.indentUnit, type; var atMediaTypes = keySet([ "all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "embossed" ]); var atMediaFeatures = keySet([ "width", "min-width", "max-width", "height", ...
PypiClean
/2ppy-0.4.0-py3-none-any.whl/tuprolog/core/formatters.py
from tuprolog import logger # noinspection PyUnresolvedReferences import jpype import jpype.imports from tuprolog.core import Formatter, TermFormatter from tuprolog.core.visitors import AbstractTermVisitor @jpype.JImplements(Formatter) class AbstractFormatter(object): @jpype.JOverride def format(self, term): ...
PypiClean
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/distance/clusters.py
import heapq from mathics.algorithm.clusters import ( AutomaticMergeCriterion, AutomaticSplitCriterion, LazyDistances, PrecomputedDistances, agglomerate, kmeans, optimize, ) from mathics.builtin.base import Builtin from mathics.builtin.options import options_to_rules from mathics.core.atoms...
PypiClean
/Clarissa-1.1.2.tar.gz/Clarissa-1.1.2/ClarissaPackages3/bot.py
import os import sys as sys os.system("python bot/bot.py engage") import bot_response as bot import bot_learn as learner import logger as log import urllib import writer as w import reader as r import urllib from importlib import reload from urllib.request import urlopen #Allow the user to communicate with the bot #Als...
PypiClean
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/data/owmergedata.py
from collections import namedtuple from itertools import chain, product import numpy as np from AnyQt.QtCore import Qt, QModelIndex, pyqtSignal as Signal from AnyQt.QtWidgets import ( QWidget, QLabel, QVBoxLayout, QHBoxLayout, QSizePolicy ) from orangewidget.utils.combobox import ComboBoxSearch import Orange fr...
PypiClean
/IPFS_Toolkit-0.5.14-py3-none-any.whl/ipfshttpclient2/client/repo.py
from . import base class Section(base.SectionBase): @base.returns_multiple_items(base.ResponseBase) def gc(self, *, quiet: bool = False, **kwargs: base.CommonArgs): """Removes stored objects that are not pinned from the repo .. code-block:: python >>> client.repo.gc() [{'Key': 'QmNPXDC6wTXVmZ9Uoc8X1...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/ion-rangeslider/js/ion.rangeSlider.min.js
!function(i){"undefined"!=typeof jQuery&&jQuery||"function"!=typeof define||!define.amd?"undefined"!=typeof jQuery&&jQuery||"object"!=typeof exports?i(jQuery,document,window,navigator):i(require("jquery"),document,window,navigator):define(["jquery"],function(t){return i(t,document,window,navigator)})}(function(a,c,l,t,...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/lang/cs.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['cs']={"editor":"Textový editor","editorPanel":"Panel textového editoru","common":{"editorHelp":"Stiskněte ALT 0 pro nápovědu","browseServer":"Vybrat na serveru"...
PypiClean
/lib/Patterns/Main.py
from __future__ import absolute_import, division, print_function from random import choice, shuffle from copy import deepcopy from .Operations import * from ..Utils import * import functools import inspect # Decorator functions for nested expansion of pattern functions and methods def loop_pattern_func(f): '''...
PypiClean
/Kahi_ror_affiliations-0.0.2a0-py3-none-any.whl/kahi_ror_affiliations/Kahi_ror_affiliations.py
from kahi.KahiBase import KahiBase from pymongo import MongoClient, TEXT from time import time from joblib import Parallel, delayed def process_one(inst, url, db_name, empty_affiliations): client = MongoClient(url) db = client[db_name] collection = db["affiliations"] found_entry = collection.find_one(...
PypiClean