id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/CRIkit2-0.4.4.tar.gz/CRIkit2-0.4.4/crikit/preprocess/algorithms/als.py
from timeit import default_timer as _timer import numpy as _np import cvxopt as _cvxopt import cvxopt.cholmod as _cholmod from scipy.interpolate import UnivariateSpline as _USpline from crikit.preprocess.algorithms.abstract_als import AbstractBaseline _cvxopt.cholmod.options['supernodal'] = 1 _cvxopt.cholmod.option...
PypiClean
/ApeMan-0.1.1.tar.gz/ApeMan-0.1.1/apeman/__36__.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function # Flags DEBUG = True # Weak references import weakref # System import os import sys import builtins # Types import types # Debugging if DEBUG : from pdb import set_trace as db # Inspection import inspect # Itera...
PypiClean
/CNVkit-0.9.10-py3-none-any.whl/skgenome/subdivide.py
import logging import pandas as pd from .merge import merge def subdivide(table, avg_size, min_size=0, verbose=False): """Split `table` rows into sub-regions of about `avg_size`.""" return pd.DataFrame.from_records( _split_targets(table, avg_size, min_size, verbose), columns=table.columns ) de...
PypiClean
/Architectural_Lens-0.0.6-py3-none-any.whl/src/plantuml/plantuml_file_creator.py
import os from src.core.bt_module import BTModule from pathlib import Path import fileinput import sys from src.utils.path_manager_singleton import PathManagerSingleton from src.utils.config_manager_singleton import ConfigManagerSingleton # list of subdomains is a set of strings, could be: # "test_project/tp_src/api" ...
PypiClean
/BlueWhale3-Educational-0.4.1.tar.gz/BlueWhale3-Educational-0.4.1/doc/widgets/pie-chart.md
Pie Chart ========= The widget for visualizing discrete attributes in the pie chart. **Inputs** - Data: input data set The aim of this widget is to demonstrate that pie charts are a terrible visualization. Please don't use it for any other purpose. ![](images/piechart-stamped.png) 1. Select the attribute you want...
PypiClean
/KratosPoromechanicsApplication-9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/PoromechanicsApplication/apply_vector_constraint_table_process.py
import KratosMultiphysics import KratosMultiphysics.PoromechanicsApplication as KratosPoro def Factory(settings, Model): if(type(settings) != KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return ApplyVectorConstraintTableProc...
PypiClean
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/nlp/abbrev.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import re from ..text import bracket_level log = logging.getLogger(__name__) class AbbreviationDetector(object): """Detect abbreviation definitions...
PypiClean
/JoeLiu-RF%20Refactoring-1.0.9.tar.gz/JoeLiu-RF Refactoring-1.0.9/rfrefactoring/referencesFinder.py
from os import path from robot304.parsing.model import ForLoop from robot304.parsing.settings import Setting import re from .reference import Reference from .referencesMethods import * """ This func is used to check whether a keyword is used in an attribute. attribute: The decomposition value of step,setting,forloop o...
PypiClean
/NMODL-0.5-cp38-cp38-macosx_10_15_x86_64.whl/nmodl/ode.py
from importlib import import_module import sympy as sp import re # import known_functions through low-level mechanism because the ccode # module is overwritten in sympy and contents of that submodule cannot be # accessed through regular imports major, minor = (int(v) for v in sp.__version__.split(".")[:2]) if major ...
PypiClean
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/camelot/view/controls/delegates/customdelegate.py
from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtCore import Qt from PyQt4.QtGui import QItemDelegate from camelot.core.utils import variant_to_pyobject from camelot.core.utils import create_constant_function from camelot.view.proxy import ValueLoading # custom color not_editable_background = QtGui.QCol...
PypiClean
/FAST-2.5.tar.gz/FAST-2.5/ez_setup.py
import sys DEFAULT_VERSION = "0.6c3" DEFAULT_URL = "http://cheeseshop.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': '5...
PypiClean
/Neveregiveup-2.0.3.tar.gz/Neveregiveup-2.0.3/wargame/attackoftheorcs.py
from __future__ import print_function import sys if sys.version_info < (3, 0): print("This code requires Python 3.x and is tested with version 3.5.x ") print("Looks like you are trying to run this using " "Python version: %d.%d " % (sys.version_info[0], sys.versi...
PypiClean
/Flask-Script-2.0.6.tar.gz/Flask-Script-2.0.6/README.rst
Flask-Script ============== .. image:: https://travis-ci.org/smurfix/flask-script.svg?branch=master :target: https://travis-ci.org/smurfix/flask-script .. image:: https://img.shields.io/pypi/v/flask-script.svg :target: http://flask-script.readthedocs.org/en/latest/ :alt: Latest Version .. image:: https:/...
PypiClean
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/yaml_35/yaml/__init__.py
from .error import * from .tokens import * from .events import * from .nodes import * from .loader import * from .dumper import * __version__ = '3.13' try: from .cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False import io def scan(stream, Loader=Loader): """ Sc...
PypiClean
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/oidc/core/grants/code.py
import logging from authlib.oauth2.rfc6749 import OAuth2Request from .util import ( is_openid_scope, validate_nonce, validate_request_prompt, generate_id_token, ) log = logging.getLogger(__name__) class OpenIDToken(object): def get_jwt_config(self, grant): # pragma: no cover """Get the J...
PypiClean
/ElOverblik-1.0.0-py3-none-any.whl/eloverblik/ElOverblik.py
import requests import json from collections import namedtuple from datetime import date, datetime, timedelta from operator import attrgetter import re import pytz US_FORMAT = "%m/%d/%Y %H:%M:%S" ISO_FORMAT_UTC = "%Y-%m-%dT%H:%M:%SZ" ISO_FORMAT = "%Y-%m-%dT%H:%M:%S%z" REQUEST_FORMAT = "%Y-%m-%d" UNIT_FORMATTER = re.co...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/threads/views/list.py
from django.http import Http404 from django.shortcuts import render from django.urls import reverse from django.views import View from ...core.shortcuts import get_int_or_404 from ..viewmodels import ( ForumThreads, PrivateThreads, PrivateThreadsCategory, ThreadsCategory, ThreadsRootCategory, ) c...
PypiClean
/FoLiA-2.5.8.tar.gz/FoLiA-2.5.8/docs/source/folia.rst
.. module:: folia.main Reading FoLiA =================== Loading a document ------------------------------- Any script that uses FoLiA starts with the import:: import folia.main as folia At the basis of any FoLiA processing lies the following class: .. autosummary:: :nosignatures: :toctree: _autosumm...
PypiClean
/NLPContractions-0.1.tar.gz/NLPContractions-0.1/README.md
# NLPContractions A Python package to replace some english words with their shorter versions (contractions) in a sentence to help text augmentation in NLP tasks. <br/> ## Installation <br /> ### Method - 1: Clone and Install ``` git clone https://github.com/vatsalsaglani/nlp-text-contractions.git cd contractions ...
PypiClean
/Corporal-0.1.15.tar.gz/Corporal-0.1.15/corporal/fablib/corporal.py
import os import json from rattail_fabric2 import apache, postgresql, python, exists, mkdir from corporal.fablib import deploy_common def bootstrap_corporal_app(c, env, envname='corporal', user='rattail', port=7900, asgi=False, sitename=None, stage=False, coredi...
PypiClean
/AbPyTools-0.3.2.tar.gz/AbPyTools-0.3.2/abpytools/core/chain.py
import re import numpy as np from ..utils import DataLoader, Download, NumberingException import pandas as pd from .helper_functions import numbering_table_sequences, numbering_table_region, numbering_table_multiindex from . import Cache from .flags import * class Chain: """The Chain object represent a single cha...
PypiClean
/Claver-Message-Board-0.0.4.tar.gz/Claver-Message-Board-0.0.4/interface/settings/SettingsMenu.py
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GdkPixbuf import interface.settings.Settings as settings class SettingsMenu: def __init__(self, settingsManager): """ Constructor """ self.__settingsManager = settingsManager self.__active_button = None self....
PypiClean
/MDP-3.6.tar.gz/MDP-3.6/bimdp/nodes/gradient.py
from builtins import str from builtins import range import mdp import bimdp np = mdp.numx class NotDifferentiableException(mdp.NodeException): """Exception if the total derivative does not exist.""" pass # Default implementation is needed to satisfy the "method" request. class GradientExtensionNode(mdp.Exte...
PypiClean
/CASCADe-spectroscopy-1.1.14.tar.gz/CASCADe-spectroscopy-1.1.14/cascade/instruments/HST/HST.py
"""HST Observatory and Instruments specific module of the CASCADe package.""" import os import collections import ast from types import SimpleNamespace import gc import warnings import numpy as np import pandas as pd from tqdm import tqdm from astropy.io import fits import astropy.units as u from astropy.time import T...
PypiClean
/MyPlotChecker-1.1.1-py3-none-any.whl/project3_plt_checker.py
import pkgutil from collections import OrderedDict import dill as pickle from import_nb import import_nb from plt_checker.core import PlotTests from plt_checker.atomic_methods import * # Global variables nb_env: dict = None # capture notebook environment plt_tests: PlotTests = None # Test cases for the plot checke...
PypiClean
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/sqlacodegen_wrapper/sqlacodegen/sqlacodegen/als_safrs_310/codegen/codegenX-merged.py
from __future__ import unicode_literals, division, print_function, absolute_import import inspect import re import sys, logging from collections import defaultdict from importlib import import_module from inspect import FullArgSpec # val-311 from keyword import iskeyword import sqlalchemy import sqlalchemy.exc from ...
PypiClean
/Appium-Python-Client-2.11.1.tar.gz/Appium-Python-Client-2.11.1/appium/webdriver/extensions/android/sms.py
# 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, software # distributed under t...
PypiClean
/ITA-test3-2.1.tar.gz/ITA-test3-2.1/hate_tweet_map/database.py
from typing import List import pymongo import yaml from pymongo import MongoClient class DataBase: """ Class to perform operation on the mongodb collection. This class handle the operation on the collection containing tweets and the operation on the collection containing the users. """ def __i...
PypiClean
/MultiRunnable-0.17.0a2-py3-none-any.whl/multirunnable/api/manage.py
from typing import Dict, Optional from ..framework.factory.base import BaseGlobalizeAPI as _BaseGlobalizeAPI from ..exceptions import GlobalizeObjectError as _GlobalizeObjectError from ..types import ( MRQueue as _MRQueue, MRLock as _MRLock, MRRLock as _MRRLock, MRSemaphore as _MRSemaphore, MRBound...
PypiClean
/FFTA-0.3.5.1-py3-none-any.whl/ffta/_legacy_functions/analyze.py
__author__ = "Rajiv Giridharagopal" __copyright__ = "Copyright 2019, Ginger Lab" __maintainer__ = "Rajiv Giridharagopal" __email__ = "rgiri@uw.edu" __status__ = "Development" import argparse as ap import logging import multiprocessing import os import sys import time import numpy as np from matplotlib import gridspe...
PypiClean
/DIgging-0.0.0.1-py3-none-any.whl/digging/digger/base_digger.py
from abc import ABC, abstractmethod, abstractproperty from easydict import EasyDict import copy import numpy as np from typing import Any, Dict, Tuple, TypeVar, Callable, Union from ding.utils.registry import Registry from ding.utils.default_helper import deep_merge_dicts from digging.utils.event import DiggingEvent f...
PypiClean
/netket-3.9.2.tar.gz/netket-3.9.2/netket/optimizer/__init__.py
from . import solver from . import qgt from .linear_operator import LinearOperator from .preconditioner import ( LinearPreconditioner, PreconditionerT, identity_preconditioner, DeprecatedPreconditionerSignature as _DeprecatedPreconditionerSignature, ) from .sr import SR from netket.utils import _hid...
PypiClean
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/plugins/standard/MatplotlibPlugin.py
""" Matplotlib standard plugin module. """ import os from nuitka.Options import isStandaloneMode from nuitka.plugins.PluginBase import NuitkaPluginBase from nuitka.plugins.Plugins import getActiveQtPlugin, hasActivePlugin from nuitka.utils.FileOperations import getFileContentByLine # spellchecker: ignore matplotlib, ...
PypiClean
/Inline-input-1.1.tar.gz/Inline-input-1.1/README.md
# Inline-Input ![wtf](https://user-images.githubusercontent.com/75082388/162805166-ec0480cb-be5e-4463-9e1b-80bffd5b1f1c.png) __Install library:__ ``` pip install inline-input ``` The simplest example: ``` import inline #Import inline module input = inline.input #replace default input while True: print("Say 'Yes...
PypiClean
/CC-dbgen-0.2.0.tar.gz/CC-dbgen-0.2.0/dbgen/scripts/Pure/Atoms/mk_relaxed_surface.py
import json def mk_relaxed_surface(rawstrs : str ,adsstrs : str ,orderstr : str ,stordirs : str ,facetstrs : str ) -> None: """ Useful object for calculation intermediate # """ raise NotI...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/Neo-Euler/Operators/Regular/Main.js
MathJax.OutputJax.SVG.FONTDATA.FONTS.NeoEulerMathJax_Operators={directory:"Operators/Regular",family:"NeoEulerMathJax_Operators",id:"NEOEULEROPERATORS",32:[0,0,333,0,0,""],160:[0,0,333,0,0,""],8710:[696,4,713,30,689,"363 671l58 25c44 -132 91 -257 143 -385c37 -90 81 -182 125 -267l-1 -16l-61 -32c-198 13 -397 21 -595 7l-2...
PypiClean
/GitPrompt-0.1.1.tar.gz/GitPrompt-0.1.1/README.txt
GitPrompt displays the current branch, the status of stash and rebase, and optionally, non-zero exit status codes. .. contents:: Examples -------- To follow along, create a new repository and set your prompt:: $ git init; touch x; git add x; git commit -m x $ export PS1='cwd$(../gitprompt $?) $ ' The curr...
PypiClean
/ClearWrap-0.2.tar.gz/ClearWrap-0.2/README.txt
Wrappers for the `NICTA fork <https://bitbucket.org/nicta_biomed/clearparser_flex>`_ of `ClearParser <https://code.google.com/p/clearparser>`_ dependency parser allowing customisation of the parsing process. It was developed primarily for the `StructuRX <https://bitbucket.org/nicta_biomed/structurx>`_ prescription int...
PypiClean
/Finance-Seleya-1.2.3.tar.gz/Finance-Seleya-1.2.3/seleya/utilities/kd_logger.py
import os, logging, datetime, inspect, time, six from .singleton import Singleton logger_dict = { 'info': logging.INFO, 'warning': logging.WARNING, 'critical': logging.CRITICAL, 'debug': logging.DEBUG, 'error': logging.ERROR } class BaseLogger(object): def __init__(self, log...
PypiClean
/Auxjad-1.0.0.tar.gz/Auxjad-1.0.0/auxjad/mutate/fill_with_rests.py
from typing import Optional import abjad from .. import get from .prettify_rewrite_meter import ( prettify_rewrite_meter as prettify_rewrite_meter_function, ) def fill_with_rests(container: abjad.Container, *, disable_rewrite_meter: bool = False, prett...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/views/debug.py
import functools import re import sys import types from pathlib import Path from django.conf import settings from django.http import HttpResponse, HttpResponseNotFound from django.template import Context, Engine, TemplateDoesNotExist from django.template.defaultfilters import pprint from django.urls import Resolver404...
PypiClean
/DisJotter-1.0.5.tar.gz/DisJotter-1.0.5/disjotter/helper/handlers.py
import base64 import json import os import importlib from typing import Optional from tornado.web import RequestHandler, HTTPError from .notebook_runner import NotebookRunner from .util import get_config class NotebookRunnerHandler(RequestHandler): def get(self, path): try: nr = NotebookRunn...
PypiClean
/AutoDict-2.0.0-py3-none-any.whl/autodict/json_drivers/ujson.py
from __future__ import annotations import datetime import io import os from typing import Callable, Union import uuid try: import ujson except ImportError as e: raise ImportError("Cannot use UltraJSONDriver without ujson installed") from e from autodict.implementation import AutoDict from autodict.json_drivers i...
PypiClean
/HeST-0.1.1.tar.gz/HeST-0.1.1/README.md
# HeST Fast python-based yields simulation technique for producing LHe yields This is an early developmental version of a yields simulation package. Further development will continue. ## Install from pip In the terminal, simply use: `pip install HeST` Then in your python scripts you can use: `from HeST import ...
PypiClean
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/sc2bench/models/segmentation/wrapper.py
import torch from torchdistill.common.main_util import load_ckpt from torchdistill.datasets.util import build_transform from torchvision.transforms.functional import crop from .registry import load_segmentation_model from ..registry import get_compression_model from ..wrapper import register_wrapper_class, WRAPPER_CLA...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/time-picker.js
module.exports = /******/ (function (modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in ...
PypiClean
/Blue-DiscordBot-3.2.0.tar.gz/Blue-DiscordBot-3.2.0/bluebot/core/events.py
import contextlib import sys import codecs import datetime import logging import traceback import asyncio from datetime import timedelta import aiohttp import discord import pkg_resources from colorama import Fore, Style, init from pkg_resources import DistributionNotFound from .. import __version__ as red_version, v...
PypiClean
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/meter_group_digest_demand_ranking_response.py
from msrest.serialization import Model class MeterGroupDigestDemandRankingResponse(Model): """MeterGroupDigestDemandRankingResponse. :param high_cost: :type high_cost: float :param low_cost: :type low_cost: float :param average_cost: :type average_cost: float :param median_cost: ...
PypiClean
/FPGAflow-esdg-0.3.5.tar.gz/FPGAflow-esdg-0.3.5/fpgaflow/helpers/funcs.py
import os import shutil import re import version as my_version import customlogging as log logger = log.config_logger(name=__name__) rev = filter(str.isdigit, "$Rev$") # Do Not Modify this Line version = my_version.Version(0, 1, 0, svn_rev=rev, disable_svn_logging=True) __version__ = version.get_version() __str__ = m...
PypiClean
/MongoContentManager-1.0.0.tar.gz/MongoContentManager-1.0.0/mongo_notebook_manager/mongodb_proxy.py
import time import pymongo def get_methods(obj): attrs = (attr for attr in dir(obj)) attrs = (attr for attr in attrs if not attr.startswith('_')) return set([attr for attr in attrs if hasattr(getattr(obj, attr), '__call__')]) EXECUTABLE_MONGO_METHODS = get_methods(pymongo.collection.Collection) EXECUTABLE...
PypiClean
/LUCI_fit-1.0-py3-none-any.whl/LUCI/LuciPlotting.py
import matplotlib.pyplot as plt from astropy.wcs import WCS import numpy as np def plot_spectrum(axis, spectrum, ax=None, units='cm-1', output_name = None, fig_size=(10,8), **kwargs): """ Plot Spectrum with Luci format. If output name is supplied, the plot will be saved Args: axis: X axis of spect...
PypiClean
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/builtin/scoping.py
from __future__ import unicode_literals from __future__ import absolute_import from mathics.builtin.base import Builtin, Predefined from mathics.core.expression import (Expression, String, Symbol, Integer, fully_qualified_symbol_name) def get_scoping_vars(var_list, msg_symbol=''...
PypiClean
/ForYou-0.1.tar.gz/ForYou-0.1/README.md
# For You 💕 ### Este proyecto te lo dedico a ti Sabes que nunca fui de palabras, pero si de acciones. Estaras siempre en mi agenda de promesas , No me preguntes cosas de amor por que me sera dificil decirtelo, a ser sincero No sé por qué te quiero...? Hoy me pregunté que porqué te quiero, y yo no tuve palabras para ...
PypiClean
/KE-py-0.9.tar.gz/KE-py-0.9/KE/v4/project.py
from __future__ import with_statement, print_function, absolute_import from KE.base import Base from KE.util import danger_action from datetime import datetime class Project(Base): def __init__(self, client=None, project_id=None, name=''): """Project Object """ super(Project, self).__init...
PypiClean
/CityLearn-1.3.1-py3-none-any.whl/citylearn/agents/rlc.py
from typing import List from gym import spaces import numpy as np from citylearn.agents.base import Agent from citylearn.preprocessing import Encoder, NoNormalization # conditional imports try: import torch except (ModuleNotFoundError, ImportError) as e: raise Exception("This functionality requires you to inst...
PypiClean
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/addon/search/matchesonscrollbar.js
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("./searchcursor"), require("../scroll/annotatescrollbar")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "./searchcursor", ".....
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/wire/TreeAdapter.js.uncompressed.js
define("dojox/wire/TreeAdapter", ["dijit","dojo","dojox","dojo/require!dojox/wire/CompositeWire"], function(dijit,dojo,dojox){ dojo.provide("dojox.wire.TreeAdapter"); dojo.require("dojox.wire.CompositeWire"); dojo.declare("dojox.wire.TreeAdapter", dojox.wire.CompositeWire, { // summary: // A composite Wire for tre...
PypiClean
/CWR-API-0.0.40.tar.gz/CWR-API-0.0.40/docs/source/cwr_structure/record_type_codes.rst
================= Record Type Codes ================= The valid Record types are always indicated in the latest CWR standard specification, and indicated on CISAC's Record Type table. These are used on a Record prefix to identify it's type. This list is offered just to make it easier identifying each of them. -----...
PypiClean
/CoCluReMiG-0.1-py3-none-any.whl/cocluremig/analyzer/graph_analyzer.py
import sqlite3 as sql from typing import Dict, Iterable, List, NamedTuple, Optional, Tuple, Union import git import pandas as pd import cocluremig.utils.gitutils as gitutils Node = Union[str, git.Commit] """Graph Node""" class Edge(NamedTuple): """ Graph Edge """ child: Node parent: Node Adje...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/agw/flatmenu.py
__docformat__ = "epytext" __version__ = "1.0" import wx import os import math import wx.lib.colourutils as colourutils import six from .fmcustomizedlg import FMCustomizeDlg from .artmanager import ArtManager, DCSaver from .fmresources import * # FlatMenu styles FM_OPT_IS_LCD = 1 """ Use this style if your computer...
PypiClean
/Decibel-1.0.1.tar.gz/Decibel-1.0.1/README.zh-CN.md
# Decibel Project # [README English](README.md) | [SQLite](https://sqlite.org/) | [PEP-249 DB-API 2.0](https://www.python.org/dev/peps/pep-0249/) | [Python Docs: SQLite3](https://docs.python.org/3/library/sqlite3.html) | [MySQL Connectors](https://www.mysql.com/products/connector/) ## About the Decibel Library ## 本库...
PypiClean
/Django-4.2.4.tar.gz/Django-4.2.4/django/utils/termcolors.py
color_names = ("black", "red", "green", "yellow", "blue", "magenta", "cyan", "white") foreground = {color_names[x]: "3%s" % x for x in range(8)} background = {color_names[x]: "4%s" % x for x in range(8)} RESET = "0" opt_dict = { "bold": "1", "underscore": "4", "blink": "5", "reverse": "7", "conceal...
PypiClean
/4channel-0.0.9.tar.gz/4channel-0.0.9/README.md
4channel is a python3 tool and module to download all images/webm from a 4channel thread. Installation --------------- ### Dependencies 4channel requires: - python (>= 3.6) ### User installation ``` pip install 4channel ``` Usage --------- ``` usage: 4channel [-h] [--webm] [--watch] [--dryrun] [-r RECURSE] u...
PypiClean
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/cms/scripting.py
from __future__ import unicode_literals from django.db.models import Max from django.db.models.fields import NOT_PROVIDED, FieldDoesNotExist from cubane.lib.model import save_model from cubane.lib.app import get_models from cubane.cms import get_page_model_name, get_page_model from cubane.cms.models import ChildPage, E...
PypiClean
/CUQIpy-0.4.0-py3-none-any.whl/cuqi/distribution/_lognormal.py
import numpy as np from cuqi.geometry import _get_identity_geometries from cuqi.distribution import Distribution from cuqi.distribution import Gaussian import warnings class Lognormal(Distribution): """ Multivariate Lognormal distribution Parameters ------------ mean: np.ndarray Mean of th...
PypiClean
/BotEXBotBase-3.1.3.tar.gz/BotEXBotBase-3.1.3/redbot/cogs/downloader/repo_manager.py
import asyncio import functools import os import pkgutil import shutil import re from concurrent.futures import ThreadPoolExecutor from pathlib import Path from subprocess import run as sp_run, PIPE from sys import executable from typing import Tuple, MutableMapping, Union, Optional from redbot.core import data_manage...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/utils/FileOperations.py
from __future__ import print_function import errno import fnmatch import glob import os import shutil import stat import tempfile import time from contextlib import contextmanager from nuitka.__past__ import ( # pylint: disable=redefined-builtin PermissionError, WindowsError, basestring, raw_input, )...
PypiClean
/Apache-Local-Domain-1.1.2.tar.gz/Apache-Local-Domain-1.1.2/ApacheLocalDomain/app/lib/file_handlers.py
import os from ApacheLocalDomain.app import configs from ApacheLocalDomain.app.lib.log import info, error from ApacheLocalDomain.app.lib.template_handlers import mapping, templateLoader, hostTemplateMaps def _createVirtualHost(domain, content): """ Create VirtualHost File :param content: Your Content Tha...
PypiClean
/CellDetection-0.4.3-py3-none-any.whl/celldetection/models/loss.py
from torch.nn.modules.loss import _Loss from torch import Tensor from torchvision.ops.focal_loss import sigmoid_focal_loss from ..ops.loss import iou_loss, box_npll_loss __all__ = ['SigmoidFocalLoss', 'IoULoss', 'BoxNpllLoss'] class _FocalLoss(_Loss): __constants__ = ['reduction'] def __init__(self, size_av...
PypiClean
/OASYS1-LNLS-ShadowOui-0.2.1.tar.gz/OASYS1-LNLS-ShadowOui-0.2.1/orangecontrib/shadow/lnls/widgets/utility/ow_caustic_widget.py
import os import sys import time #import numpy import h5py from matplotlib import pyplot as plt from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.figure import Figure from matplotlib.colors import LogNorm import numpy as np from scipy.optimize import curve_fit from scipy.interpolate imp...
PypiClean
/Glances-3.4.0.3.tar.gz/Glances-3.4.0.3/docs/gw/couchdb.rst
.. _couchdb: CouchDB ======= You can export statistics to a ``CouchDB`` server. The connection should be defined in the Glances configuration file as following: .. code-block:: ini [mongodb] host=localhost port=27017 db=glances user=root password=example and run Glances with: .. code-block...
PypiClean
/CoAPy-4.0.2.tar.gz/CoAPy-4.0.2/coapthon/messages/response.py
from coapthon.utils import parse_blockwise from coapthon import defines from coapthon.messages.message import Message from coapthon.messages.option import Option class Response(Message): @property def location_path(self): """ :rtype : String """ value = [] for option i...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/documents/search_indexes.py
from pinax.ratings.models import OverallRating from dialogos.models import Comment from django.contrib.contenttypes.models import ContentType from django.db.models import Avg from haystack import indexes from geonode.documents.models import Document class DocumentIndex(indexes.SearchIndex, indexes.Indexable): id...
PypiClean
/MDAKit-1.0.0-py3-none-any.whl/MDKit/lib/msmtools/GMRQ.py
import pyemma import numpy as np import pandas as pd try: from sklearn.cross_validation import KFold except: from sklearn.model_selection import KFold from sklearn.pipeline import Pipeline from pyemma.coordinates.clustering import kmeans from pyemma.coordinates.transform import tica import logging def _dict_c...
PypiClean
/ObjectRoles-0.6X.zip/ObjectRoles-0.6X/ez_setup/__init__.py
import sys DEFAULT_VERSION = "0.6c6" DEFAULT_URL = "http://cheeseshop.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': '5...
PypiClean
/NNGT-2.7.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl/nngt/core/spatial_graph.py
import numpy as np import nngt from nngt.lib import InvalidArgument, nonstring_container from .connections import Connections from .graph import Graph # ------------ # # SpatialGraph # # ------------ # class SpatialGraph(Graph): """ The detailed class that inherits from :class:`~nngt.Graph` and implements...
PypiClean
/Octopost-1.0.1b0.tar.gz/Octopost-1.0.1b0/src/arpes_model.py
# Python Imports import glob import warnings # Third Party Imports import h5py import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import RegularGridInterpolator # Octopost Imports import units from library import (cartesian_to_spherical, E_to_k, k_to_E, find_nearest_index, ...
PypiClean
/Kato-FlaskAppBuilder-1.1.14.tar.gz/Kato-FlaskAppBuilder-1.1.14/flask_appbuilder/models/generic/__init__.py
__author__ = 'dpgaspar' import operator import os from ..._compat import with_metaclass from datetime import date, datetime #-------------------------------------- # Exceptions #-------------------------------------- class PKMissingException(Exception): def __init__(self, model_name=''): message = ...
PypiClean
/GlobalPayments.Api-1.0.9.tar.gz/GlobalPayments.Api-1.0.9/globalpayments/api/builders/validations/validations.py
import globalpayments.api from globalpayments.api.builders.validations.validation_target import ValidationTarget class Validations(object): rules = None def __init__(self): self.rules = {} def of(self, type_name): ''' Creates a new `ValidationTarget` for the given transac...
PypiClean
/Flask-Migrate-tw-1.8.1.tar.gz/Flask-Migrate-tw-1.8.1/flask_migrate/templates/flask-multidb/env.py
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool, MetaData from logging.config import fileConfig import logging USE_TWOPHASE = False # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context...
PypiClean
/Flask-AppBuilder-redirect-2.1.13.tar.gz/Flask-AppBuilder-redirect-2.1.13/flask_appbuilder/filemanager.py
import logging import os import os.path as op import re import uuid from flask.globals import _request_ctx_stack from werkzeug.datastructures import FileStorage from wtforms import ValidationError try: from flask import _app_ctx_stack except ImportError: _app_ctx_stack = None app_stack = _app_ctx_stack or _r...
PypiClean
/MyBotUtils-0.2.2.tar.gz/MyBotUtils-0.2.2/botutils/cogs/utils/checks/custom_checks.py
from discord.ext import commands def has_permissions(**permissions): def predicate(ctx): setattr(ctx.command, 'requires_permissions', permissions) return commands.has_permissions(**permissions).predicate(ctx) return commands.check(predicate) def bot_has_permissions(**permissions): def pred...
PypiClean
/InvokeAI-3.1.0-py3-none-any.whl/invokeai/app/invocations/metadata.py
from typing import Optional from pydantic import Field from invokeai.app.invocations.baseinvocation import ( BaseInvocation, BaseInvocationOutput, InputField, InvocationContext, OutputField, invocation, invocation_output, ) from invokeai.app.invocations.controlnet_image_processors import C...
PypiClean
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/html/_build/html/_build/html/_build/html/_build/html/hn_module_tutorial.ipynb
# Tutorial for the HN module of HavNegpy package ``` import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import HavNegpy as dd %matplotlib qt os.chdir(r'M:\Marshall_Data\mohamed_data\mohamed_data\n44') def create_dataframe(f): col_names = ['Freq', 'T', 'Eps1', 'Eps2'] #f ...
PypiClean
/ConSSL-0.0.1-py3-none-any.whl/CSSL/losses/self_supervised_learning.py
import numpy as np import torch from torch import nn from CSSL.models.vision.pixel_cnn import PixelCNN def nt_xent_loss(out_1, out_2, temperature): """ Loss used in SimCLR """ out = torch.cat([out_1, out_2], dim=0) n_samples = len(out) # Full similarity matrix cov = torch.mm(out, out.t()...
PypiClean
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/ice1hte.py
import genice2.lattices from logging import getLogger import numpy as np def usage(): logger = getLogger() logger.info(__doc__) desc = {"ref": {"C0": "Teeratchanan 2015"}, "usage": usage(), "brief": "Filled ice Ih by Teeratchanan (Hydrogen disordered). (Positions of guests are supplied.)" ...
PypiClean
/HPPPM-0.1.tar.gz/HPPPM-0.1/hpppm/field_parser.py
import re, sys __version__ = '0.1' def tokenizer(input, weedout, split_on='"\s+?"', ignore=[]): """ Convert raw input string into units of interest.Weedout and ignore text not needed. """ tokens = re.split(split_on, input) while tokens: token = tokens.pop(0) for to_ignore in ...
PypiClean
/BALISTICA-1.0.0.tar.gz/BALISTICA-1.0.0/balistica/GUI/NumericalV2Wind.py
import numpy as np import matplotlib import tkinter as tk from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg matplotlib.use("TkAgg") from matplotlib import pyplot as plt plt.rcParams.update({'figure.max_open_warning': 0}) from matplotlib.figure import Figure from balistica.PhysicsEngine.NumericalVSqWindPhy...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA-AI-1.1/DLTA_AI_app/mmdetection/configs/albu_example/mask_rcnn_r50_fpn_albu_1x_coco.py
_base_ = '../mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) albu_train_transforms = [ dict( type='ShiftScaleRotate', shift_limit=0.0625, scale_limit=0.0, rotate_limit=0, interpolation=...
PypiClean
/GailBot-0.2a0-py3-none-any.whl/gailbot/services/organizer/settings/objects/settingObject.py
from typing import Dict, List, Union, TypedDict, Optional from .engineObject import EngineSetObj from .pluginObject import PluginSuiteSetObj from ..interface import ( load_watson_setting, load_whisper_setting, load_google_setting, EngineSettingInterface, PluginSettingsInterface, ) from gailbot.core....
PypiClean
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/currency_store.py
import re # noqa: F401 import sys # noqa: F401 from firefly_iii_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type,...
PypiClean
/Incantation-0.4.1.1-py3-none-any.whl/incantation/Component/Badges.py
from ..abst import Tag, Attribute, ITraitsAttribute, ITraitsTag, traits_class from ..utils import default_initializer, doc_printer, ArgumentError import linq class Badge(Tag): @default_initializer def __init__(self, *components, new=False): if new: Tag.__init__(self, 'span', Attribute('cla...
PypiClean
/NEURON_gpu_nightly-8.2a7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/neuron/rxd/rate.py
from .rxdException import RxDException import weakref from . import species, rxdmath, rxd, initializer import numpy from .rangevar import RangeVar import itertools import warnings from .generalizedReaction import GeneralizedReaction # aliases to avoid repeatedly doing multiple hash-table lookups _itertools_chain = ite...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/PharLapCommon.py
__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2014/07/05 09:42:21 garyo" import os import os.path import SCons.Errors import SCons.Util import re def getPharLapPath(): """Reads the registry to find the installed path of the Phar Lap ETS development kit. Raises UserError if no installed version...
PypiClean
/Hikka_TL-1.24.14-py3-none-any.whl/telethon/tl/types/upload.py
from ...tl.tlobject import TLObject from typing import Optional, List, Union, TYPE_CHECKING import os import struct from datetime import datetime if TYPE_CHECKING: from ...tl.types.storage import TypeFileType from ...tl.types import TypeFileHash class CdnFile(TLObject): CONSTRUCTOR_ID = 0xa99fca4f SU...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/utils/Importing.py
import os import sys from nuitka.PythonVersions import python_version from nuitka.Tracing import general from .Utils import withNoDeprecationWarning def _importFilePy3NewWay(filename): """Import a file for Python versions 3.5+.""" import importlib.util # pylint: disable=I0021,import-error,no-name-in-module...
PypiClean
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/agents/exclude/dppo_agent.py
import multiprocessing import time from neodroidagent.utilities import * from neodroidagent.utilities import TransitionBuffer use_gpu = False def collect_samples(pid, queue, env, policy, custom_reward, mean_action, tensor, render, running_state, update_rs, min_batch_size): torch.randn(pid, ) ...
PypiClean
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/lorem/el_GR/__init__.py
from typing import Dict from .. import Provider as LoremProvider class Provider(LoremProvider): """Implement lorem provider for ``el_GR`` locale.""" common_words = ( "άρα", "ένα", "ένας", "έξι", "έτσι", "έχω", "ήδη", "ίδιο", "αν", ...
PypiClean
/MedCLIP-0.0.3.tar.gz/MedCLIP-0.0.3/medclip/constants.py
BERT_TYPE = 'emilyalsentzer/Bio_ClinicalBERT' VIT_TYPE = 'microsoft/swin-tiny-patch4-window7-224' IMG_SIZE = 224 IMG_MEAN = .5862785803043838 IMG_STD = .27950088968644304 CHEXPERT_TASKS = [ "No Finding", "Enlarged Cardiomediastinum", "Cardiomegaly", "Lung Lesion", "Lung Opacity", "Edema", ...
PypiClean
/Flask_AppBuilder-4.3.6-py3-none-any.whl/flask_appbuilder/utils/base.py
import logging from typing import Any, Callable import unicodedata from urllib.parse import urlparse from flask import current_app, request from flask_babel import gettext from flask_babel.speaklater import LazyString log = logging.getLogger(__name__) def is_safe_redirect_url(url: str) -> bool: if url.startswi...
PypiClean