id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/ssn/zh_CN/__init__.py
import datetime from typing import List, Optional from ....typing import SexLiteral from .. import Provider as SsnProvider class Provider(SsnProvider): # Extracted from # http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html area_codes: List[str] = [ "110000", "110100", ...
PypiClean
/Hippodamia-0.4.2.tar.gz/Hippodamia-0.4.2/hippodamia/commands.py
import pprint from hippodamia.agentshadow.agentshadowfactory import AgentShadowFactory import pelops.ui.tools from hippodamia.enums import StatType from hippodamia.enums import ViewDetails class CommandFactory: _logger = None _shadows = None _hierarchical_view = None _request_ping = None _request_...
PypiClean
/FanFicFare-4.27.0.tar.gz/FanFicFare-4.27.0/fanficfare/adapters/adapter_hlfictionnet.py
# Copyright 2012 Fanficdownloader team, 2018 FanFicFare team # # 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 applica...
PypiClean
/Flask-DebugToolbar-0.13.1.tar.gz/Flask-DebugToolbar-0.13.1/src/flask_debugtoolbar/static/codemirror/mode/coffeescript/coffeescript.js
CodeMirror.defineMode('coffeescript', function(conf) { var ERRORCLASS = 'error'; function wordRegexp(words) { return new RegExp("^((" + words.join(")|(") + "))\\b"); } var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\?]"); var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`...
PypiClean
/Grevling-2.0.0-py3-none-any.whl/grevling/typing.py
from __future__ import annotations from datetime import datetime from enum import Enum import json from pathlib import Path from typing import Any, Dict, Optional, Type from dataclasses import dataclass import pandas as pd from pydantic import create_model, PrivateAttr from pydantic.main import BaseModel from . imp...
PypiClean
/FlyBrainLab-1.1.10-py3-none-any.whl/flybrainlab/NeurokernelComponent.py
import sys, traceback from twisted.internet.defer import inlineCallbacks, returnValue from twisted.logger import Logger from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession from autobahn.wamp.exception import ApplicationError from autobahn.wamp import auth import networkx as nx ...
PypiClean
/AnyBlok-2.1.0.tar.gz/AnyBlok-2.1.0/anyblok/authorization/rule/attraccess.py
from .base import AuthorizationRule, RuleNotForModelClasses class AttributeAccessRule(AuthorizationRule): """Grant authorization to principals coinciding with a record attribute. Whatever the permission is associated to this policy, it will be granted to principals on records whose attribute is equal to ...
PypiClean
/MySQL-python-vincent-1.2.5.tar.gz/MySQL-python-vincent-1.2.5/setup_posix.py
import os, sys from ConfigParser import SafeConfigParser # This dequote() business is required for some older versions # of mysql_config def dequote(s): if s[0] in "\"'" and s[0] == s[-1]: s = s[1:-1] return s def compiler_flag(f): return "-%s" % f def mysql_config(what): from os import pope...
PypiClean
/DataScrubber-0.0.2.tar.gz/DataScrubber-0.0.2/README.md
# dstrial Module Documentation ## Overview This documentation explains the functions available in the ***`Datacleaning`*** module, which is designed to assist in data cleaning and analytics tasks ## Creating the an instance Through this process, we are calling our class which will help us access the various functions...
PypiClean
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/tools/specialize/CTypeDescriptions.py
import math from abc import abstractmethod from nuitka.__past__ import getMetaClassBase, long from nuitka.code_generation.Namify import namifyConstant class TypeDescBase(getMetaClassBase("Type")): # To be overloaded type_name = None type_desc = None type_decl = None python_requirement = None ...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/terminal/user_error.py
from muntjac.terminal.error_message import IErrorMessage from muntjac.terminal.gwt.server.abstract_application_servlet import AbstractApplicationServlet class UserError(IErrorMessage): """C{UserError} is a controlled error occurred in application. User errors are occur in normal usage of the application and ...
PypiClean
/maxbot-0.3.0b2-py3-none-any.whl/maxbot/extensions/datetime.py
from datetime import date, datetime, time, timezone from dateutil.parser import parse from dateutil.tz import gettz from ..errors import BotError def tz_filter(name): """Retrieve a time zone object from a string representation. :param str name: A time zone name. :return tzinfo: """ tz = gettz(n...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/gis/db/backends/base/features.py
import re from django.contrib.gis.db import models class BaseSpatialFeatures: gis_enabled = True # Does the database contain a SpatialRefSys model to store SRID information? has_spatialrefsys_table = True # Does the backend support the django.contrib.gis.utils.add_srs_entry() utility? supports_...
PypiClean
/KratosRomApplication-9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/RomApplication/calculate_rom_basis_output_process.py
import json import numpy from pathlib import Path # Importing the Kratos Library import KratosMultiphysics from KratosMultiphysics.RomApplication.randomized_singular_value_decomposition import RandomizedSingularValueDecomposition def Factory(settings, model): if not isinstance(settings, KratosMultiphysics.Paramet...
PypiClean
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/canvas/help/provider.py
import os import logging import io from urllib.parse import urljoin from html import parser from xml.etree.ElementTree import TreeBuilder, Element from AnyQt.QtCore import QObject, QUrl from AnyQt.QtNetwork import ( QNetworkAccessManager, QNetworkDiskCache, QNetworkRequest, QNetworkReply ) from .intersphinx i...
PypiClean
/MACS-1.4.3.tar.gz/MACS-1.4.3/lib/OptValidator.py
# ------------------------------------ # python modules # ------------------------------------ import sys import os import re import logging from subprocess import Popen, PIPE from math import log from MACS1.IO.Parser import BEDParser, ELANDResultParser, ELANDMultiParser, ELANDExportParser, PairEndELANDMultiParser, SAM...
PypiClean
/MPInterfaces-2020.6.19.tar.gz/MPInterfaces-2020.6.19/mpinterfaces/lammps.py
from __future__ import division, print_function, unicode_literals, \ absolute_import """ Calibrate LAMMPS jobs """ from six.moves import map from six.moves import zip import os import logging from collections import OrderedDict from pymatgen.core.structure import Structure from pymatgen.io.ase import AseAtomsA...
PypiClean
/MJOLNIR-1.3.1.tar.gz/MJOLNIR-1.3.1/test/_tools.py
import numpy as np from MJOLNIR._tools import * import os def test_minMax(): L = np.random.rand(10,3,2) minmax = minMax(L) assert(len(minmax)==2) assert(np.isclose(minmax[0],np.min(L))) assert(np.isclose(minmax[1],np.max(L))) minmax = np.array(minMax(L,axis=-1)) assert(minmax.shape==...
PypiClean
/JapaneseVerbConjugator-1.0.1-py3-none-any.whl/japaneseverbconjugator/private/PositiveVerbFormGenerator.py
from ..src.constants.ParticleConstants import * from ..src.constants.VerbEndingConstants import * from ..src.constants.EnumeratedTypes import Formality, Tense, VerbClass from ..src.Utils import * # ---------------------------------------------------------- # # Positive Verb Forms ...
PypiClean
/Darc-1.2.1.zip/Darc-1.2.1/darc.py
__author__='Taylor "Nekroze" Lawson' import os import fnmatch import random import struct import bz2 import tarfile import cStringIO import re import hashlib import fnmatch try: from Crypto.Cipher import AES except ImportError: ##Ignore this it is used for compatability with installations that do not have pycrypto. ...
PypiClean
/LogicPy-0.0.1.tar.gz/LogicPy-0.0.1/README.md
# Digital Logic Functions **Project implements basic to advance logic functions like gates , flip flops and many more circuits...** ## Contributors: > [Sunil Lad](https://github.com/Sunillad08) > [Parth Khanolkar](https://github.com/ParthKhanolkar) # Circuits and logics to be implemented ### First release : - [...
PypiClean
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/oldanki/stats.py
__docformat__ = 'restructuredtext' # we track statistics over the life of the deck, and per-day STATS_LIFE = 0 STATS_DAY = 1 import unicodedata, time, sys, os, datetime import oldanki, oldanki.utils from datetime import date from oldanki.db import * from oldanki.lang import _, ngettext from oldanki.utils import canon...
PypiClean
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/docs/tutorials/example_class1.rst
Typical Analytical YSO Model ============================ The following example model sets up the Class I model from `Whitney et al (2003) <http://adsabs.harvard.edu/abs/2003ApJ...598.1079W>`_ For now, this model does not include the accretion luminosity, but this will be added in the future. First, we set up the mode...
PypiClean
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/history_export_result.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 HistoryExportResult: default_attributes = { 'id': None, # int64 - Action ID 'created_at':...
PypiClean
/ChatterBot2-1.1.0a7.tar.gz/ChatterBot2-1.1.0a7/chatterbot/logic/mathematical_evaluation.py
from chatterbot.logic import LogicAdapter from chatterbot.conversation import Statement from chatterbot import languages class MathematicalEvaluation(LogicAdapter): """ The MathematicalEvaluation logic adapter parses input to determine whether the user is asking a question that requires math to be done. ...
PypiClean
/Flask-CacheOBJ-0.2.2.tar.gz/Flask-CacheOBJ-0.2.2/flask_cacheobj/cache.py
import inspect import logging from functools import wraps import msgpack from redis.exceptions import ConnectionError from decorator import decorator, decorate from .msgpackable import encode, decode from .format import format_key_pattern from .proxy import mc from .utils import make_deco from ._compat import text_ty...
PypiClean
/Dot_Plot-0.1.3.1.tar.gz/Dot_Plot-0.1.3.1/library/core.py
# Standard library imports import datetime import tkinter as tk import random from tkinter.filedialog import asksaveasfilename import tempfile import PIL # from PIL import Image, ImageTk # import warnings from collections import UserString # Third party imports from abc import ABC, abstractmethod # import svgwrite ...
PypiClean
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/data/classification/deprec/s_vgg_face2.py
__author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 25/03/2020 """ import csv from pathlib import Path from typing import Tuple import torch from PIL import Image from draugr.numpy_utilities import SplitEnum from draugr.visualisation import progress_bar from matplotlib import pyp...
PypiClean
/Mastodon.py-1.8.1.tar.gz/Mastodon.py-1.8.1/mastodon/Mastodon.py
import json import base64 import os import os.path import time import datetime import collections from contextlib import closing import requests from requests.models import urlencode import dateutil import dateutil.parser import re import copy from .compat import IMPL_HAS_CRYPTO, IMPL_HAS_ECE, IMPL_HAS_BLURHASH from...
PypiClean
/GelReportModels-7.8.0.tar.gz/GelReportModels-7.8.0/protocols/metrics_1_2_0.py
from protocols.protocol import ProtocolElement from protocols.protocol import SearchRequest from protocols.protocol import SearchResponse from protocols.protocol import avro_parse import avro.schema version = '1.2.0' class AdoptedStatus(object): """ adoptedin means adopted into the family adoptedout mea...
PypiClean
/KratosCoSimulationApplication-9.4-cp39-cp39-win_amd64.whl/KratosMultiphysics/CoSimulationApplication/data_transfer_operators/sum_many_to_many.py
from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_data_transfer_operator import CoSimulationDataTransferOperator def Create(*args): return SumManyToMany(*args) class SumManyToMany(CoSimulationDataTransferOperator): """DataTransferOperator to sum values on one interface and put it to a...
PypiClean
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/common.js
"use strict"; function init_common() { //Init CodeMirror colorizeStaticCode(); $('.code-editor').each(function(index, elem) { registerCodeEditor(elem, $(elem).attr('data-x-language'), $(elem).attr('data-x-lines')); }); //Fix a bug with codemirror and bootstrap tabs $('a[data-toggle...
PypiClean
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/core/static/js/html5shiv.js
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(...
PypiClean
/NlpToolkit-Classification-1.0.16.tar.gz/NlpToolkit-Classification-1.0.16/Classification/InstanceList/Partition.py
from Util.RandomArray import RandomArray from Classification.InstanceList.InstanceList import InstanceList from Classification.InstanceList.InstanceListOfSameClass import InstanceListOfSameClass class Partition(object): __multi_list: list def __init__(self, instanceList: InstanceList = Non...
PypiClean
/AaronOS_Messaging-0.1.1.tar.gz/AaronOS_Messaging-0.1.1/messaging_client/main.py
from messaging_client.messaging import Messaging from time import sleep from threading import Thread import sys, readline, os NAME = input("Username> ") ADMIN = input("Admin? t/f> ") if ADMIN.lower() == "t": ADMIN = True elif ADMIN.lower() == "f": ADMIN = False else: raise ValueError("Use t or f") M = Mes...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/nodes/OutlineNodes.py
from .ChildrenHavingMixins import ChildHavingBodyOptionalMixin from .ConstantRefNodes import makeConstantRefNode from .ExceptionNodes import ExpressionRaiseException from .ExpressionBases import ExpressionBase from .FunctionNodes import ExpressionFunctionBodyBase from .LocalsScopes import getLocalsDictHandle class Ex...
PypiClean
/Fragmenstein-0.12.11.tar.gz/Fragmenstein-0.12.11/fragmenstein/demo/__init__.py
__all__ = ['TestSet', 'MPro', 'BaseMolDataset'] from ._base_dataset_holder import BaseMolDataset, extend_doc from rdkit import Chem from typing import List import os # ---------------------------------------------------------------------------------------------------------------------- from . import test_mols cla...
PypiClean
/NREL_disco-0.4.2-py3-none-any.whl/disco/pydss/prescreen_pv_penetration_levels.py
import logging from collections import namedtuple from jade.exceptions import ExecutionError from jade.result import ResultsSummary from jade.utils.subprocess_manager import run_command from jade.utils.utils import dump_data, load_data from disco.common import EXIT_CODE_GOOD from disco.exceptions import is_convergen...
PypiClean
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/static/pylot/vendor/mdeditor/bower_components/codemirror/addon/hint/python-hint.js
(function () { function forEach(arr, f) { for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); } function arrayContains(arr, item) { if (!Array.prototype.indexOf) { var i = arr.length; while (i--) { if (arr[i] === item) { return true; } } return false; ...
PypiClean
/Eureqa-1.76.0.tar.gz/Eureqa-1.76.0/eureqa/analysis/components/by_row_plot.py
from eureqa.analysis.components.base import _Component from eureqa.utils.jsonrest import _JsonREST class ByRowPlot(_Component): """ Represents a line graph for plotting variables by row. For example:: p = ByRowPlot(d, x_var='W', focus_variable='W', plotted_variables=['A'], should_center=True) ...
PypiClean
/EggTranslations-1.2.1.tar.gz/EggTranslations-1.2.1/egg_translations.py
# Copyright (c) 2006-2009 Open Source Applications Foundation # # 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 requir...
PypiClean
/armaqdl-0.9.1-py3-none-any.whl/armaqdl/armaqdl.py
import argparse import os import re import shutil import subprocess import threading import time from pathlib import Path from urllib.parse import quote if os.name == "nt": import winreg from ._version import __version__ from .const import PACKAGE from . import config, update VERBOSE = False DRY = False SETTING...
PypiClean
/Distutils2-1.0a4.tar.gz/Distutils2-1.0a4/distutils2/pypi/dist.py
import re import tempfile import urllib import urlparse from distutils2.errors import IrrationalVersionError from distutils2.version import (suggest_normalized_version, NormalizedVersion, get_version_predicate) from distutils2.metadata import Metadata from distutils2.pypi.errors import (...
PypiClean
/Clyther-0.4-beta.tar.gz/Clyther-0.4-beta/doc/perfpy/laplace.py
import numpy from scipy import weave import sys, time from argparse import ArgumentParser, FileType from core import TimeSteper, available, timestep_methods import opencl_methods try: import flaplace import flaplace90_arrays import flaplace95_forall except ImportError: flaplace = None flaplace90_...
PypiClean
/EDDIE-Tool-1.0.0.tar.gz/EDDIE-Tool-1.0.0/eddietool/arch/Linux/system.py
__version__ = '$Revision: 895 $' __copyright__ = 'Copyright (c) Chris Miles 1999-2005' __author__ = 'Chris Miles' __license__ = ''' This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; eithe...
PypiClean
/Notable-0.4.2.tar.gz/Notable-0.4.2/notable/app.py
# Python imports from time import gmtime, sleep, strftime, time import json import logging import optparse import os import re import signal import sys import threading import webbrowser # Assume python3 and fall back to python2 try: import http.client as http from urllib.request import urlopen from urlli...
PypiClean
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imreconstruct/view/ReconstructionView.py
import numpy as np from qtpy import QtCore, QtWidgets from imswitch.imcommon.view.guitools import naparitools from . import guitools class ReconstructionView(QtWidgets.QFrame): """ Frame for showing the reconstructed image""" # Signals sigItemSelected = QtCore.Signal() sigAxisStepChanged = QtCore.Si...
PypiClean
/ChessAnalysisPipeline-0.0.11-py3-none-any.whl/CHAP/processor.py
# system modules import argparse from inspect import getfullargspec import logging from sys import modules from time import time # local modules from CHAP.pipeline import PipelineItem class Processor(PipelineItem): """Generic data processor. The job of any `Processor` in a `Pipeline` is to receive data r...
PypiClean
/Flask-SQLAlchemy-Meiqia-2016.8.1.zip/Flask-SQLAlchemy-Meiqia-2016.8.1/docs/contexts.rst
.. _contexts: .. currentmodule:: flask_sqlalchemy Introduction into Contexts ========================== If you are planning on using only one application you can largely skip this chapter. Just pass your application to the :class:`SQLAlchemy` constructor and you're usually set. However if you want to use more than...
PypiClean
/ALMASim-1.4.tar.gz/ALMASim-1.4/submodules/illustris_python/sublink.py
import numpy as np import h5py import glob import six import os from .groupcat import gcPath, offsetPath from .util import partTypeNum def treePath(basePath, treeName, chunkNum=0): """ Return absolute path to a SubLink HDF5 file (modify as needed). """ # tree_path = '/trees/' + treeName + '/' + 'tree_extende...
PypiClean
/M2CryptoWin64-0.21.1-3.tar.gz/M2CryptoWin64-0.21.1-3/M2Crypto/SSL/Context.py
__all__ = ['map', 'Context'] from weakref import WeakValueDictionary # M2Crypto import cb from M2Crypto import util, BIO, Err, RSA, m2, X509 class _ctxmap: singleton = None def __init__(self): self.map = WeakValueDictionary() def __getitem__(self, key): return self.map[key] def __s...
PypiClean
/CairoPLib-0.0.5-py3-none-any.whl/pcairo/cairoP.py
from math import pi import cairo def hex_return(dec) -> str: return str(format(dec, 'x')) class Color: def __init__(self, red: int = 0, green: int = 0, blue: int = 0, alpha: int = 255): self.red = red self.green = green self.blue = blue self.alpha = alpha self.status ...
PypiClean
/HolmesV-2021.10.8.tar.gz/HolmesV-2021.10.8/mycroft/lock/__init__.py
from signal import getsignal, signal, SIGKILL, SIGINT, SIGTERM, \ SIG_DFL, default_int_handler, SIG_IGN # signals from mycroft.configuration import BASE_FOLDER import os # Operating System functions # # Wrapper around chain of handler functions for a specific system level signal. # Often used to trap Ctrl-C for...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/themes/Julie.js.uncompressed.js
define("dojox/charting/themes/Julie", ["../Theme", "dojox/gfx/gradutils", "./common"], function(Theme, gradutils){ // created by Julie Santilli (Claro-based theme) var themes = dojox.charting.themes, g = Theme.generateGradient, defaultFill = {type: "linear", space: "shape", x1: 0, y1: 0, x2: 0, y2: 100}; them...
PypiClean
/hypergraphanalysistoolbox-1.0.20.tar.gz/hypergraphanalysistoolbox-1.0.20/HAT/Hypergraph.py
import numpy as np import scipy as sp import scipy.linalg # import scipy.stats from itertools import permutations import networkx as nx import HAT.multilinalg as mla import HAT.draw import HAT.HAT class Hypergraph: """This is the base class representing a Hypergraph object. It is the primary entry point and p...
PypiClean
/EHRcorral-0.0.3.tar.gz/EHRcorral-0.0.3/docs/index.rst
.. ehrcorral documentation master file, created by sphinx-quickstart on Tue Jul 9 22:26:36 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. .. |br| raw:: html <br /> Welcome to EHRCorral's documentation! ===============================...
PypiClean
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/mdeditor/bower_components/codemirror/addon/merge/merge.js
(function() { "use strict"; var Pos = CodeMirror.Pos; var svgNS = "http://www.w3.org/2000/svg"; function DiffView(mv, type) { this.mv = mv; this.type = type; this.classes = type == "left" ? {chunk: "CodeMirror-merge-l-chunk", start: "CodeMirror-merge-l-chunk-start", end: "C...
PypiClean
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/nlp/tag.py
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from abc import ABCMeta, abstractmethod from collections import defaultdict import io import logging import pickle import random import re import dawg import pycrfsuite import six from ..data import load_mode...
PypiClean
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/template_line.py
from msrest.serialization import Model class TemplateLine(Model): """TemplateLine. :param template_line_id: The template line identifier :type template_line_id: int :param begin_day: The begin day :type begin_day: int :param end_day: The end day :type end_day: int :param display_orde...
PypiClean
/Dabo-0.9.16.tar.gz/Dabo-0.9.16/dabo/ui/uiwx/dMenuItem.py
import types import wx import dPemMixin as pm import dIcons import dabo from dabo.dLocalize import _ import dabo.dEvents as dEvents from dabo.ui import makeDynamicProperty from dabo.lib.utils import ustr class dMenuItem(pm.dPemMixin, wx.MenuItem): """Creates a menu item, which is usually represented as a string.""" ...
PypiClean
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/model/interfaces/thorlabs_tsi_sdk/tl_camera_enums.py
from enum import IntEnum class _CTypesEnum(IntEnum): @classmethod def from_param(cls, obj): return int(obj) class OPERATION_MODE(_CTypesEnum): """ The OPERATION_MODE enumeration defines the available modes for a camera. """ SOFTWARE_TRIGGERED = 0 """ Use software operation m...
PypiClean
/Flask-DBMigrate-0.1.tar.gz/Flask-DBMigrate-0.1/flask_dbmigrate.py
import re import os from shutil import rmtree from flask import current_app from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.script import Manager, Command, Option from sqlalchemy import schema from migrate.versioning import api, schemadiff from migrate.exceptions import InvalidRepositoryError def with_v...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/gis/geos/polygon.py
from ctypes import c_uint, byref from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR from django.contrib.gis.geos.linestring import LinearRing from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils...
PypiClean
/NDBC-1.2.0.tar.gz/NDBC-1.2.0/docs/source/index.rst
.. NDBC documentation master file, created by sphinx-quickstart on Mon Sep 12 16:28:48 2022. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to NDBC's documentation! ================================ .. toctree:: :maxdepth: 2 :capti...
PypiClean
/Nxpy-0.6.0.tar.gz/Nxpy-0.6.0/README.rst
Nick's Python Toolchest - 0.6.0 =============================== Nxpy is an etherogeneous collection of useful modules, dealing with diverse topics such as wrapping complex commands with API's or interacting with Java and .NET build systems. There are also more basic utilities, such as automation of backup files, sup...
PypiClean
/AFEM-1.0.34-py3-none-any.whl/FEM/Elements/Element.py
import logging import numpy as np from typing import Callable # TODO make list of avaliable Element atributes. class Element(): """Generates a generic element. Args: coords (np.ndarray): Vertical coordinates matrix _coords (np.ndarray): Vertical coordinates matrix for graphical interfaces ...
PypiClean
/ContrailOnlineCAService-0.4.0.tar.gz/ContrailOnlineCAService-0.4.0/contrail/security/onlineca/server/wsgi/middleware.py
__author__ = "P J Kershaw" __date__ = "24/05/10" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$" import logging log = logging.getLogger(__name__) import os import base64 im...
PypiClean
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/plugins/keepkey/clientbase.py
import time from struct import pack from electrum_zcash.i18n import _ from electrum_zcash.util import PrintError, UserCancelled from electrum_zcash.keystore import bip39_normalize_passphrase from electrum_zcash.bitcoin import serialize_xpub class GuiMixin(object): # Requires: self.proto, self.device message...
PypiClean
/Gato-1.2.7.tar.gz/Gato-1.2.7/PlanarEmbedding.py
############################################################################### ############################################################################### ############################################################################### # ...
PypiClean
/ODMExifRead-3.0.4.tar.gz/ODMExifRead-3.0.4/exifread/tags/makernote/olympus.py
from exifread.utils import make_string def special_mode(val): """Decode Olympus SpecialMode tag in MakerNote""" mode1 = { 0: 'Normal', 1: 'Unknown', 2: 'Fast', 3: 'Panorama', } mode2 = { 0: 'Non-panoramic', 1: 'Left to right', 2: 'Right to left',...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/lang/it.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['it']={"editor":"Rich Text Editor","editorPanel":"Pannello Rich Text Editor","common":{"editorHelp":"Premi ALT 0 per aiuto","browseServer":"Cerca sul server","ur...
PypiClean
/MangadexDownloaderLib-1.0.1-py3-none-any.whl/DataModels/PageModel.py
from typing import Union import urllib import os import re from DataModels.models_logger import models_logger class PageModel: """ """ def __init__(self, page_number :int, chapter_number :Union[int, float], volume_number :Union[int, float], hash_chapter :str, server_url :str, filename_on_server :str): ...
PypiClean
/MIAvisual-0.0.6-py3-none-any.whl/matplotlib/figure.py
from contextlib import ExitStack import inspect import logging from numbers import Integral import numpy as np import matplotlib as mpl from matplotlib import _blocking_input, docstring, projections from matplotlib.artist import ( Artist, allow_rasterization, _finalize_rasterization) from matplotlib.backend_bases...
PypiClean
/NDBC-1.2.0.tar.gz/NDBC-1.2.0/docs/html/_static/underscore-1.13.1.js
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define('underscore', factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () { var current = global....
PypiClean
/125softNLP-0.0.1-py3-none-any.whl/kashgari/corpus.py
import os import logging import pandas as pd from kashgari import macros as k from typing import Tuple, List from tensorflow.python.keras.utils import get_file from kashgari import utils CORPUS_PATH = os.path.join(k.DATA_PATH, 'corpus') class DataReader(object): @staticmethod def read_conll_format_file(fil...
PypiClean
/Flask-Administration-0.1.42.tar.gz/Flask-Administration-0.1.42/flask_administration/static/js/library/underscore.js
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case...
PypiClean
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/pilot/impl/pilotdata_manager.py
import sys import os import logging import uuid import random import threading import time import pdb import Queue import socket import tldextract tldextract.tldextract.LOG.setLevel(logging.WARNING) import difflib from pilot.api.api import PilotError sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) ...
PypiClean
/Geode_GEM-0.12.0-py3-none-any.whl/geode_gem/ui/dialog/maintenance.py
# Geode-GEM from geode_gem.ui.data import Icons from geode_gem.ui.utils import replace_for_markup from geode_gem.ui.widgets.window import CommonWindow from geode_gem.widgets import GeodeGtk # GObject from gi.repository import Gtk, Pango # Translation from gettext import gettext as _ class MaintenanceDialog(CommonW...
PypiClean
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/ext/autosectionlabel.py
from typing import Any, Dict from typing import cast from docutils import nodes from docutils.nodes import Node from sphinx.application import Sphinx from sphinx.domains.std import StandardDomain from sphinx.locale import __ from sphinx.util import logging from sphinx.util.nodes import clean_astext logger = logging...
PypiClean
/DigLabTools-0.0.2-py3-none-any.whl/redcap_bridge/project_building.py
import pathlib import warnings import numpy as np import pandas as pd import redcap_bridge from redcap_bridge.project_validation import \ validate_project_against_template_parts from redcap_bridge.utils import map_header_json_to_csv from diglab_utils.provenance import get_repo_state diglabtools_dir = pathlib.Pa...
PypiClean
/0x01-autocert-dns-aliyun-0.1.tar.gz/0x01-autocert-dns-aliyun-0.1/README.md
# Aliyun DNS plugin for autocert project This plugin provides an automated `perform_dns01()` for [autocert](https://github.com/Smart-Hypercube/autocert/tree/master/letsencrypt#apply-for-some-certificates). ```python3 # other kinds of credential, e.g. StsTokenCredential, can be used as well credential = AccessKeyCrede...
PypiClean
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/extern/pygments/styles/friendly.py
from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace class FriendlyStyle(Style): """ A modern style based on the VIM pyte theme. """ background_color = "#f0f0f0" default_style = "" styles = { W...
PypiClean
/Nasdaq%20Data%20Link-1.0.4.tar.gz/Nasdaq Data Link-1.0.4/FOR_ANALYSTS.md
# Quick Method Guide - Nasdaq Data Link/Python This quick guide offers convenient ways to retrieve individual datasets or datatables with the Python package without the need for complex commands. ## Retrieving Data Retrieving data can be achieved easily using these methods `nasdaqdatalink.get` for datasets, `nasdaqd...
PypiClean
/AuthTkt-0.3.3.tar.gz/AuthTkt-0.3.3/authtkt/app/index.py
import logging import datetime from appdispatch import BaseArea from httpkit.helper.cookie import set_cookie, delete_cookie from pipestack.ensure import ensure_method_marble as ensure_action from dreamweavertemplate.decorator import render_template from bn import HTMLFragment, AttributeDict from formbuild import Table...
PypiClean
/FourDExplorer-0.5.9.tar.gz/FourDExplorer-0.5.9/README.md
# 4D-Explorer ----------- [![4D-Explorer](https://iili.io/QkQPFn.png)](https://freeimage.host/i/QkQPFn) 4D-Explorer is a software to analyze four-dimensional scanning transmission electron microscopy (4D-STEM) data. It can import and save 4D-STEM datasets and their metadata, calibrate them and reconstruct images in r...
PypiClean
/HydPy-5.0.1-cp38-cp38-win_amd64.whl/hydpy/docs/rst/required_tools.rst
.. _GitHub: https://github.com .. _hydpy repository: https://github.com/hydpy-dev/hydpy .. _CPython: https://www.python.org/ .. _requirements.txt: https://github.com/hydpy-dev/hydpy/blob/master/requirements.txt .. _Cython: http://www.cython.org/ .. _Sphinx: http://www.sphinx-doc.org/en/master/ .. _conf.py: https://gith...
PypiClean
/OASYS1-COMSYL-1.0.19.tar.gz/OASYS1-COMSYL-1.0.19/orangecontrib/comsyl/scripts/load_results_from_file.py
import numpy from srxraylib.plot.gol import plot_image, plot import sys from comsyl.scripts.CompactAFReader import CompactAFReader def plot_stack(mystack,what="intensity",title0="X",title1="Y",title2="Z"): from silx.gui.plot.StackView import StackViewMainWindow from silx.gui import qt app = qt.QAppl...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/build_scripts/UCSCImport.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
/ANNOgesic-1.1.14.linux-x86_64.tar.gz/usr/local/lib/python3.10/dist-packages/annogesiclib/extract_RBS.py
from annogesiclib.gff3 import Gff3Parser from annogesiclib.helper import Helper def get_feature(cds): if "locus_tag" in cds.attributes.keys(): feature = cds.attributes["locus_tag"] elif "protein_id" in cds.attributes.keys(): feature = cds.attributes["protein_id"] else: feature = cd...
PypiClean
/FlexGet-3.9.6-py3-none-any.whl/flexget/ui/v1/src/plugins/series/components/series-episode/series-episode.component.spec.js
describe('Plugin: Series-Episode.Component', function () { var component, deferred; var episodes = mockSeriesData.getEpisodes(); var episode = mockSeriesData.getEpisode(); var show = mockSeriesData.getShow(); beforeEach(function () { bard.appModule('plugins.series'); /* global $com...
PypiClean
/ETSProjectTools-0.6.0.tar.gz/ETSProjectTools-0.6.0/enthought/ets/develop.py
import os import sys # Project library imports from enthought.ets.base_subcommand import BaseSubcommand from enthought.ets.tools.checkouts import Checkouts class Develop(BaseSubcommand): """ Perform a development install on the projects within a checkout. """ def __init__(self, subparsers): ...
PypiClean
/NIM_API_Python-0.1.0.tar.gz/NIM_API_Python-0.1.0/netease_im/constants/params.py
FRIEND_ADD_SILENTLY = 1 # 直接加好友 FRIEND_ADD_REQUEST = 2 # 请求加好友 FRIEND_ADD_AGREE = 3 # 同意加好友 FRIEND_ADD_REFUSE = 4 # 拒绝加好友 RELATION_TYPE_BLACK = 1 # 黑名单操作 RELATION_TYPE_MUTE = 2 # 静音列表操作 OP_VALUE_REMOVE = 0 # 取消黑名单或静音 OP_VALUE_ADD = 1 # 加入黑名单或静音 MESSAGE_OPE_USER = 0 # 点对点个人消息 MESSAGE_OPE_TEAM = 1 # 群消息 M...
PypiClean
/GC-Flask-Blogging-1.1.2.tar.gz/GC-Flask-Blogging-1.1.2/example/blog_cache.py
from flask import Flask, render_template_string, redirect, current_app from sqlalchemy import create_engine, MetaData from flask_login import UserMixin, LoginManager, login_user, logout_user, current_user from flask_blogging import SQLAStorage, BloggingEngine from flask_principal import identity_changed, Identity, Anon...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/client/hooksets.py
import json class BaseHookSet(object): # Layers def layer_list_template(self, context=None): return 'layers/layer_list_default.html' def layer_detail_template(self, context=None): return NotImplemented def layer_new_template(self, context=None): return NotImplemented de...
PypiClean
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/models/signals_model/signal_node_model.py
from typing import Iterable, List from PyQt6.QtGui import QDrag from PyQt6.QtCore import QMimeData, QPointF, QSizeF, Qt from PyQt6.QtWidgets import QGraphicsItem, QGraphicsSceneMouseEvent from muphyn.packages.core.application import DataType from muphyn.packages.interface.models.signals_model.abstract_connection_mod...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/visualization_scripts/umap_learn/umap.py
from __future__ import print_function from warnings import warn from scipy.optimize import curve_fit from sklearn.base import BaseEstimator from sklearn.utils import check_random_state, check_array from sklearn.metrics import pairwise_distances from sklearn.preprocessing import normalize from sklearn.neighbors import ...
PypiClean
/Flask-Share-0.1.1.tar.gz/Flask-Share-0.1.1/README.rst
Flask-Share =========== Create social share component in Jinja2 template based on `share.js <https://github.com/overtrue/share.js/>`_. Get Started ----------- Installation is easy: .. code:: bash $ pip install flask-share Initialize the extension: .. code:: python from flask_share import Share ... ...
PypiClean
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/geometry/intersections/intersections.py
from __future__ import print_function from __future__ import absolute_import from __future__ import division from math import fabs from math import sqrt import compas from compas.utilities import pairwise from compas.utilities import geometric_key from compas.geometry import allclose from compas.geometry import add...
PypiClean
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/emby/emby_lookup.py
from loguru import logger from flexget import plugin from flexget.components.emby.api_emby import EmbyApi, EmbyAuth from flexget.components.emby.emby_util import SCHEMA_SERVER, get_field_map from flexget.entry import register_lazy_lookup from flexget.event import event logger = logger.bind(name='emby_lookup') class...
PypiClean
/ConGen-0.0.5.tar.gz/ConGen-0.0.5/src/python-congen-git/build/lib/congen/layers/pointLayers/StratifiedRandomPointLayer.py
import numpy as np from layers.Parameter import Parameter from layers.pointLayers.PointLayer import PointLayer class StratifiedRandomPointLayer(PointLayer): def __init__(self, type="Stratified Random Points", **kwargs): super().__init__() self.parameters.append(Parameter(name="xCells", desc="Numb...
PypiClean