id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/NURBS-Python-3.8.0.tar.gz/NURBS-Python-3.8.0/geomdl/exchange.py | import warnings
import struct
from . import Abstract
from . import Multi
from .elements import Vertex, Triangle
# Saves surface(s) as a .obj file
def save_obj(surf_in=None, file_name=None, **kwargs):
""" Exports surface(s) as a .obj file.
:param surf_in: surface or surfaces to be saved
:type surf_in: Ab... | PypiClean |
/FP-SMC-ALS-test1-0.0.1.tar.gz/FP-SMC-ALS-test1-0.0.1/smc/routing/access_list.py | import collections
from smc.base.model import Element, ElementCreator
from smc.api.exceptions import ElementNotFound
AccessListEntry = collections.namedtuple("AccessListEntry", "subnet action comment")
"""
An AccessListEntry defines a simple entry for an IPAccessList used in dynamic
routing configurations.
:ivar str... | PypiClean |
/LinkPython-0.1.1.tar.gz/LinkPython-0.1.1/modules/pybind11/docs/limitations.rst | Limitations
###########
Design choices
^^^^^^^^^^^^^^
pybind11 strives to be a general solution to binding generation, but it also has
certain limitations:
- pybind11 casts away ``const``-ness in function arguments and return values.
This is in line with the Python language, which has no concept of ``const``
val... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/nodes/ContainerMakingNodes.py | import functools
from abc import abstractmethod
from nuitka.PythonVersions import needsSetLiteralReverseInsertion
from .ChildrenHavingMixins import ChildHavingElementsTupleMixin
from .ConstantRefNodes import (
ExpressionConstantListEmptyRef,
ExpressionConstantSetEmptyRef,
ExpressionConstantTupleEmptyRef,
... | PypiClean |
/NoseGAE-0.5.10.tar.gz/NoseGAE-0.5.10/README.rst | NoseGAE: Nose for Google App Engine Testing
===========================================
`|PyPI| <https://pypi.python.org/pypi/NoseGAE>`_
`|Downloads| <https://pypi.python.org/pypi/NoseGAE>`_
`|License| <https://pypi.python.org/pypi/NoseGAE>`_ `|Build
Status| <https://travis-ci.org/Trii/NoseGAE>`_
Installing
---------... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/Preset.py |
# +---------------------------------------------------------------------------+
# | 01001110 01100101 01110100 01111010 01101111 01100010 |
# | |
# | Netzob : Inferring communication protocols |... | PypiClean |
/CaseRecommender-1.1.1.tar.gz/CaseRecommender-1.1.1/caserec/recommenders/item_recommendation/paco_recommender.py | from collections import defaultdict
import numpy as np
from caserec.clustering.paco import PaCo
from caserec.evaluation.item_recommendation import ItemRecommendationEvaluation
from caserec.utils.process_data import ReadFile
__author__ = 'Arthur Fortes <fortes.arthur@gmail.com>'
class PaCoRecommender(object):
de... | PypiClean |
/GSEIM-1.4.tar.gz/GSEIM-1.4/src/grc/core/utils/expr_utils.py | from __future__ import absolute_import, print_function
import string
def expr_replace(expr, replace_dict):
"""
Search for vars in the expression and add the prepend.
Args:
expr: an expression string
replace_dict: a dict of find:replace
Returns:
a new expression with the prepe... | PypiClean |
/DukeDSClient-2.0.2.tar.gz/DukeDSClient-2.0.2/ddsc/core/ignorefile.py | import os
import re
import fnmatch
DDS_IGNORE_FILENAME = '.ddsignore'
class FileFilter(object):
"""
Provides a function for filtering files based on a regex.
"""
def __init__(self, file_exclude_regex):
"""
Set exclusion regex to be used when filtering.
Pass empty string to in... | PypiClean |
/Byunichenko_DB_and_PyQt_client_module-0.0.1.tar.gz/Byunichenko_DB_and_PyQt_client_module-0.0.1/client/main_window.py | import base64
import json
import logging
from Cryptodome.Cipher import PKCS1_OAEP
from Cryptodome.PublicKey import RSA
from PyQt5.QtCore import QEvent, QSortFilterProxyModel, Qt, pyqtSlot
from PyQt5.QtGui import QIcon, QStandardItem, QStandardItemModel
from PyQt5.QtWidgets import QAction, QMainWindow, QMenu, QMessageB... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/codemirror/js/mode/d/d.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use s... | PypiClean |
/NEURON_gpu_nightly-8.2a7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/neuron/rxd/multiCompartmentReaction.py | import weakref
from . import rxdmath, rxd, node, species, region, initializer
import numpy
from .generalizedReaction import (
GeneralizedReaction,
get_scheme_rate1_rate2_regions_custom_dynamics_mass_action,
)
from .constants import molecules_per_mM_um3
from neuron import h
import itertools
from .rxdException im... | PypiClean |
/MTinderApi-0.0.3-py3-none-any.whl/TinderApi/api/account.py | from datetime import datetime
import json
from ..exceptions import *
class Account:
def __init__(self, api):
self.api = api
def get_me(self) -> dict:
res = self.api.s.get("/profile", 2, params=f"?locale={self.api.locale}&include=user,account")
self.api.debugger.Log(f"Logged in... | PypiClean |
/Asset_Allocation-1.3.3.tar.gz/Asset_Allocation-1.3.3/asset_allocation/loader.py | from decimal import Decimal
from logging import DEBUG, log
from typing import List
from gnucash_portfolio.bookaggregate import BookAggregate
from piecash import Account, Book, Commodity, open_book
from pricedb.model import PriceModel
from . import dal
from .config import Config, ConfigKeys
from .maps import AssetClas... | PypiClean |
/MedCode-0.0.2.tar.gz/MedCode-0.0.2/README.md | # MedCode: Medication Code Mapping Tool
There are many medication/drug taxonomy systems, such as RxNorm, NDC, ATC. I feel it time-consuming and very confusing to map codes between two different systems during working on this **drug recommendation project** https://github.com/ycq091044/SafeDrug. Sometimes, the code map... | PypiClean |
/HiCExplorer-2.2.1.1-py3-none-any.whl/hicexplorer/chicDifferentialAnalysis.py | import argparse
import sys
import numpy as np
from hicmatrix import HiCMatrix as hm
# from hicexplorer.utilities import toString
from hicexplorer._version import __version__
from .lib import Viewpoint
from .lib import Utilities
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.... | PypiClean |
/FunID-0.3.16.2.tar.gz/FunID-0.3.16.2/funid/src/reporter.py | import datetime
import pandas as pd
import matplotlib.pyplot as plt
import io
import logging
import plotly.express as px
from tabulate import tabulate
from funid.src.tool import index_step
from funid.src.save import save_df
# For version reporting
__version__ = "0.3.16.2"
### Temporary report for tree_interpretation... | PypiClean |
/Chrysalio-1.0.tar.gz/Chrysalio-1.0/chrysalio/models/dbuser.py | """SQLAlchemy-powered model definitions for users."""
from datetime import datetime, date
from bcrypt import hashpw, gensalt
import colander
from sqlalchemy import Column, Integer, ForeignKey
from sqlalchemy import String, Enum, Date, DateTime, Boolean
from sqlalchemy.orm import relationship
from lxml import etree
fr... | PypiClean |
/Gpyts-1.0.3-py3-none-any.whl/gpyts/syncGpyts/__init__.py |
#MIT License
#Copyright (c) 2021 Ripe
import requests, random, json, time, os, io, re
from .. import config, errors
from typing import Union, List
from .. types import Translation, TextToSpeech
class Gpyts():
"""Gpyts is a library for Google translation and gTTS using Google Translation API.
"""
def __init__(sel... | PypiClean |
/KaKaoRyan-0.0.1.tar.gz/KaKaoRyan-0.0.1/Ryan/__init__.py | from Ryan.exceptions import (ParamError, ScheamError,
RequiredError,)
class Param:
def __init__(self, *args, **kwargs):
self.types = []
self.scheam = None
if not args:
raise ParamError('未接收到参数')
if isinstance(args[0], dict):
self.s... | PypiClean |
/Algebraic-Expression-Parser-0.0.4.tar.gz/Algebraic-Expression-Parser-0.0.4/README.md | # Algebraic-Expression-Parser
Control and handle any algebraic expression, as well as do common expression operations such as getting postfix, prefix, and expression tree.
# Requirements
- binarytree
```
pip install binarytree
```
## Installing
[`pip install Algebraic-Expression-Parser`](https://pypi.org/project/Alge... | PypiClean |
/NFC%20Key-0.1.0.tar.gz/NFC Key-0.1.0/nfckey/settings.py | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/interaction/slave/slave.py | import json
import sys
import time
import traceback
from abc import abstractmethod
from functools import wraps
from threading import Thread, Event, Lock
from typing import Optional, Callable, Any, Mapping
from uuid import UUID
import requests
from flask import Flask, request
from .action import ConnectionRefuse, Disc... | PypiClean |
/ClusterShell-1.9.1.tar.gz/ClusterShell-1.9.1/doc/sphinx/install.rst | .. highlight:: console
Installation
============
ClusterShell is distributed in several packages. On RedHat-like OS, we
recommend to use the RPM package (.rpm) distribution.
As system software for cluster, ClusterShell is primarily made for
system-wide installation to be used by system administrators. However,
chang... | PypiClean |
/Kivy-2.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/kivy/uix/splitter.py | __all__ = ('Splitter', )
from kivy.factory import Factory
from kivy.uix.button import Button
from kivy.properties import (OptionProperty, NumericProperty, ObjectProperty,
ListProperty, BooleanProperty)
from kivy.uix.boxlayout import BoxLayout
class SplitterStrip(Button):
'''Class use... | PypiClean |
/Oasys-Canvas-Core-1.0.7.tar.gz/Oasys-Canvas-Core-1.0.7/orangecanvas/canvas/items/graphicspathobject.py | from PyQt5.QtWidgets import QGraphicsObject
from PyQt5.QtGui import QPainterPath, QPainterPathStroker, QBrush, QPen
from PyQt5.QtCore import Qt, QPointF, pyqtSignal as Signal
from ...utils.qtcompat import qunwrap
class GraphicsPathObject(QGraphicsObject):
"""A QGraphicsObject subclass implementing an interface... | PypiClean |
/Flask-Dance-7.0.0.tar.gz/Flask-Dance-7.0.0/flask_dance/contrib/README.rst | Pre-set Configurations
======================
This directory contains pre-set consumer configurations for
several popular OAuth providers. Have one that you'd like to add? Great, we
love pull requests! However, you must meet certain criteria for your
configuration to accepted:
1. You must create a Python file in this ... | PypiClean |
/ApeMan-0.1.1.tar.gz/ApeMan-0.1.1/apeman/__36__.repeats.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Constants
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
# ... | PypiClean |
/DpmModule-1.1.0-py3-none-any.whl/dpmModule/item/BossAccesory.py | from . import ItemKernel as it
#No upgrade
#자쿰 얼장(응축된 힘의 결정석)...(5)
Face110 = it.Item(stat_main = 5, stat_sub = 5, att = 5, level = 110)
#자쿰 눈장....(3)
Eye100 = it.Item(stat_main = 6, stat_sub = 6, att = 1, level = 100)
#자쿰 벨트....(3)
Belt150 = it.Item(stat_main = 18, stat_sub = 18, att = 1, level = 150)
#매그너스 숄더..(1... | PypiClean |
/Aries-Python-0.1.330.tar.gz/Aries-Python-0.1.330/Aries/files.py | import binascii
import gzip
import os
import json
import tempfile
import logging
import re
from urllib.parse import urljoin, urlparse
from shutil import copyfile, copyfileobj
from .strings import FileName
logger = logging.getLogger(__name__)
class File:
"""Provides shortcuts for handling files.
"""
__si... | PypiClean |
/JitViewer-0.2.1.tar.gz/JitViewer-0.2.1/_jitviewer/static/app.js | MainDisplay = can.Control({
init: function(element, options){
this.highlight_class = "variable_highlight";
},
"a[data-name] click": function(el, ev) {
ev.preventDefault();
var name = el.data('name');
var path = el.data('path') || "";
if(name) {
can.route.a... | PypiClean |
/Chronix2Grid-1.2.0.post1.tar.gz/Chronix2Grid-1.2.0.post1/chronix2grid/kpi/main.py |
# Python built-in modules
import warnings
import os
import json
# Chronix2grid modules
from .preprocessing.pivot_KPI import pivot_format
from .deterministic.kpis import EconomicDispatchValidator
from ..generation import generation_utils as gu
from .. import constants as cst
from .. import utils as ut
def main(kpi_i... | PypiClean |
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/services/converter/converter.py | from typing import Dict, List, Union, Tuple
from .payload import (
load_transcribed_dir_payload,
load_audio_payload,
load_conversation_dir_payload,
PayLoadObject)
from gailbot.core.utils.logger import makelogger
from ..organizer.source import SourceObject
from gailbot.workspace.manager import Workspa... | PypiClean |
/Chinese-holiday-0.1.6.tar.gz/Chinese-holiday-0.1.6/chinese_holiday.py | import requests
from bs4 import BeautifulSoup
import re, os, json
import datetime as dt
from datetime import datetime, timedelta
import time
from urllib import parse
HOLIDAY_DATA_PATH = os.path.join(os.getcwd(), 'holiday.json')
def get_holiday_data(year, force_refresh=False):
"""加载节假日数据,没有则去国务院网站解析
Keyw... | PypiClean |
/ComplexNetworkSim-0.1.2.zip/ComplexNetworkSim-0.1.2/examples/getting started code/first_simulation.py | SUSCEPTIBLE = 0
INFECTED = 1
RECOVERED = 2
from ComplexNetworkSim import NetworkAgent, Sim
class SIRSimple(NetworkAgent):
""" an implementation of an agent following the simple SIR model """
def __init__(self, state, initialiser):
NetworkAgent.__init__(self, state, initialiser)
... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_it.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/LDB_Inventory_Barcode-0.14.1.tar.gz/LDB_Inventory_Barcode-0.14.1/README.rst | ldb.inventory.barcode
=====================
This code originates from python-barcode
(https://github.com/WhyNotHugo/python-barcode). What follows (aside from the
Licence section) is from their readme.
**python-barcode** provides a simple way to create barcodes in Python.
There are no external dependencies when gene... | PypiClean |
/HalWeb-0.6.0.tar.gz/HalWeb-0.6.0/src/halicea/baseProject/lib/halicea/template.py | import logging
import md5
import os
import conf.settings
from google.appengine.api import lib_config
from google.appengine.ext import webapp
def _django_setup():
"""Imports and configures Django.
This can be overridden by defining a function named
webapp_django_setup() in the app's appengine_config.py file (se... | PypiClean |
/Flask-SignalBus-0.5.20.tar.gz/Flask-SignalBus-0.5.20/docs/cli.rst | .. _command-line-interface:
Command Line Interface
======================
Flask-SignalBus will register a group of Flask CLI commands, starting
with the prefix ``signalbus``. To see all available commands, use::
$ flask signalbus --help
To flush pending signals which have failed to auto-flush, use::
$ flas... | PypiClean |
/NIDDL-0.1.8-py3-none-any.whl/cnn_archs/baseline_v.py | import tensorflow as tf
def conv2d(x, W, b, strides=1):
# Conv2D wrapper, with bias and relu activation
x = tf.nn.conv2d(x, W, strides=[1, strides, strides, 1], padding='SAME')
x = tf.nn.bias_add(x, b)
return tf.nn.relu(x)
def maxpool2d(x, k=2):
return tf.nn.max_pool(x, ksize=[1, k, k, 1], strides... | PypiClean |
/CmonCrawl-1.0.3.tar.gz/CmonCrawl-1.0.3/docs/source/cli/extract.rst | Command line Extract
====================
The extract mode of the ```cmon``` command line tool servers to extract your download files.
The following arguments are needed in this order:
Positional arguments
--------------------
1. config_path - Path to config file containing extraction rules.
2. output_path - Path ... | PypiClean |
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/layers/layer_norm.py |
import oneflow as flow
from oneflow import nn
from libai.utils import distributed as dist
class LayerNorm(nn.Module):
"""Applies Layer Normalization over a mini-batch of inputs in 1D parallelism.
Args:
normalized_shape: input shape from an expected input of size.
eps: a value added to the d... | PypiClean |
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_insight_transfer_tag/get.py | from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict
from firefly_iii_client import api_client, exceptions
from datetime import date, datetime # noqa: F401
import decimal # noqa: F401
import functools # noqa: F401
import io # noqa: F401
import re... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/nodes/SubscriptNodes.py | from nuitka.PythonVersions import python_version
from .ConstantRefNodes import makeConstantRefNode
from .ExpressionBases import ExpressionChildrenHavingBase
from .ExpressionShapeMixins import ExpressionBoolShapeExactMixin
from .NodeBases import (
SideEffectsFromChildrenMixin,
StatementChildrenHavingBase,
)
fro... | PypiClean |
/Mopidy-Spotify-4.1.1.tar.gz/Mopidy-Spotify-4.1.1/mopidy_spotify/playlists.py | import logging
from mopidy import backend
import spotify
from mopidy_spotify import translator, utils
_sp_links = {}
logger = logging.getLogger(__name__)
class SpotifyPlaylistsProvider(backend.PlaylistsProvider):
def __init__(self, backend):
self._backend = backend
self._timeout = self._backen... | PypiClean |
/KS_Constants-1.2.33-py3-none-any.whl/ks_constants/maps.py | from enum import Enum
from ks_constants.devs import Developer
from ks_constants.locale import Language
import os
KS2_MAPS_DIRECTORY = "ks2-maps"
class Map(Enum):
Classic = (0,
{
Language.Chinese: '经典永存',
Language.English: 'Classic',
Language.... | PypiClean |
/DeepRank-GNN-0.1.22.tar.gz/DeepRank-GNN-0.1.22/deeprank_gnn/GraphGen.py | import os
import sys
import h5py
from tqdm import tqdm
import time
from .ResidueGraph import ResidueGraph
from .Graph import Graph
class GraphHDF5(object):
def __init__(self, pdb_path, ref_path=None, graph_type='residue', pssm_path=None,
select=None, outfile='graph.hdf5', biopython=False):
... | PypiClean |
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/preprocessor/_derive/lwp.py |
import logging
from iris import NameConstraint
from ._baseclass import DerivedVariableBase
logger = logging.getLogger(__name__)
class DerivedVariable(DerivedVariableBase):
"""Derivation of variable `lwp`."""
@staticmethod
def required(project):
"""Declare the variables needed for derivation."... | PypiClean |
/KADAI-1.0.0rc1.tar.gz/KADAI-1.0.0rc1/kadai/engine/genhue.py | import colorsys
from PIL import Image,ImageStat
from colorthief import ColorThief
from kadai.utils import ColorUtils
# Match XColors
color_hues = (240, 0, 120, 60, 240, 300, 180)
class HueEngine():
def __init__(self, image):
self.image = image
self.color = getDominantColorFromImage(image)
d... | PypiClean |
/Flask-YunPian-0.0.1.tar.gz/Flask-YunPian-0.0.1/README.rst | Flask-YunPian
=============
云片_发送短信的Flask扩展
使用
----
.. code-block::
from flask_yunpin import YunPian
yunpian = YunPian()
yunpian.init_app(app)
发送短信
--------
.. code::
yunpian.send(phones, content, sign=None)
phones可以传单个手机号或者手机号列表,分别调用单条发送接口和批量发送接口
配置项
------
====================== ========... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/factor/data/winsorize.py |
import numpy as np
import numba as nb
from . utilities import group_mapping
from . utilities import aggregate
from . utilities import transform
from . utilities import array_index
from . utilities import simple_mean
from . utilities import simple_std
@nb.njit(nogil=True, cache=True)
def mask_values_2d(x: np.ndarray,... | PypiClean |
/ChatRoom_jianjun-3.1.0-cp310-cp310-win_amd64.whl/ChatRoom/data/Package/DemoUser/demo2/client.py | import time
from ChatRoom.package import BaseClient
import DemoUser.demo2 as SelfPackage
from DemoUser.demo2.ext_lib import plus
# 获取本包路径
# 在不同的设备上运行服务端或客户端, 都可以使用这个 SelfPackage.__path__[0] 都可以获取到当前运行环境的包的路径, 来使用包的一些文件
PAC_PATH = SelfPackage.__path__[0]
class Client(BaseClient):
""" 和服务端对应的函数 """
def fun1(se... | PypiClean |
/ICD_Interfaces-1.0-py3-none-any.whl/ICD_Interfaces/ANALOGUE.py | from models.interfaces import Interface, OutputLine, OutputSignal, InputLine, InputSignal, APEX_FLOAT_LENGTH, APEX_DEFAULT_REFRESH
from typing import Type
class ANALOGUE_OUTPUT_LINE(OutputLine):
def __init__(self)->None:
super().__init__()
self.name = ''
self.line_name = ''
self.li... | PypiClean |
/GRR-M2Crypto-0.22.6.tar.gz/GRR-M2Crypto-0.22.6/M2Crypto/EC.py | import util, BIO, m2
class ECError(Exception): pass
m2.ec_init(ECError)
# Curve identifier constants
NID_secp112r1 = m2.NID_secp112r1
NID_secp112r2 = m2.NID_secp112r2
NID_secp128r1 = m2.NID_secp128r1
NID_secp128r2 = m2.NID_secp128r2
NID_secp160k1 = m2.NID_secp160k1
NID_secp160r1 = m2.NID_secp160r1
NID_secp160r2 = m2... | PypiClean |
/DEBM-0.2.3.tar.gz/DEBM-0.2.3/debm/Prospect.py | import numpy as np
import matplotlib.pyplot as plt
class Prospect:
"""
This is a prospect in a decision-making problem.
Define the number of trials (round) agents are faced in this problem,
fun is the function that generates these outcomes (in case these are stochastic outcomes),
you can send an arr... | PypiClean |
/MonkeyType-23.3.0-py3-none-any.whl/monkeytype/stubs.py | import asyncio
import collections
import enum
import inspect
import logging
import re
from abc import ABCMeta, abstractmethod
from typing import (
Any,
Callable,
DefaultDict,
Dict,
ForwardRef,
Iterable,
List,
Optional,
Set,
Tuple,
Union,
)
from monkeytype.compat import (
... | PypiClean |
/DVDev-0.1.3.tar.gz/DVDev-0.1.3/dvdev/config/middleware.py | from beaker.middleware import CacheMiddleware, SessionMiddleware
from paste.cascade import Cascade
from paste.registry import RegistryManager
from paste.urlparser import StaticURLParser
from paste.deploy.converters import asbool
from pylons import config
from pylons.middleware import ErrorHandler, StatusCodeRedirect
fr... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py | """A Pin class for use with libgpiod."""
try:
import gpiod
except ImportError:
raise ImportError(
"libgpiod Python bindings not found, please install and try again! See "
"https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/master/libgpiod.sh"
) from ImportError
# pylint: disabl... | PypiClean |
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/onedrive/sites/sites_with_root.py | from office365.entity_collection import EntityCollection
from office365.onedrive.internal.paths.root import RootPath
from office365.onedrive.internal.paths.site import SitePath
from office365.onedrive.sites.site import Site
from office365.runtime.paths.resource_path import ResourcePath
from office365.runtime.queries.fu... | PypiClean |
/MongoNorm-0.4.0.tar.gz/MongoNorm-0.4.0/mongonorm/document.py | from mongonorm.cursor import Cursor
from pymongo import ReturnDocument
property_methods = [
'full_name',
'name',
'database',
'oid',
'raw',
]
class_methods = [
'with_options',
'initialize_unordered_bulk_op',
'initialize_ordered_bulk_op',
'bulk_write',
'insert_one',
'insert_... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/types/inline_mode/inline_query_result_voice.py |
from typing import List, Optional
import fipper
from fipper import raw, types, utils, enums
from .inline_query_result import InlineQueryResult
class InlineQueryResultVoice(InlineQueryResult):
"""Link to a voice recording in an .OGG container encoded with OPUS.
By default, this voice recording will be s... | PypiClean |
/Flask-Navigate-0.2.2.tar.gz/Flask-Navigate-0.2.2/flask_navigate/views.py | from flask import current_app, url_for
from werkzeug.local import LocalProxy
from .helper import view_context, render, add_view_function, model_exists, \
edit_view_function, delete_view_function
from .models import NavForm, NavItemForm
from .templates import nav_admin_add_nav_item_template, nav_admin_add_nav_templ... | PypiClean |
/Findex_GUI-0.2.18-py3-none-any.whl/findex_gui/static/plugins/daterangepicker/moment.min.js | (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Bb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invali... | PypiClean |
/nws_api_check-1.0.2.tar.gz/nws_api_check-1.0.2/src/pagination_check.py | import requests
import json
from requests.exceptions import ConnectionError
import datetime
from datetime import date, timedelta
import pytz
from pytz import timezone
from requests_handler import responseHandler
# Ask for user input
userInput = raw_input("Select URL to use (enter 1, 2, or 3):\n1. Origin\n2. Developm... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/LabExT/Tests/Fixtures/MCSControlInterface.py | SA_OK = 0
SA_INITIALIZATION_ERROR = 1
SA_NOT_INITIALIZED_ERROR = 2
SA_NO_SYSTEMS_FOUND_ERROR = 3
SA_TOO_MANY_SYSTEMS_ERROR = 4
SA_INVALID_SYSTEM_INDEX_ERROR = 5
SA_INVALID_CHANNEL_INDEX_ERROR = 6
SA_TRANSMIT_ERROR = 7
SA_WRITE_ERROR = 8
SA_INVALID_PARAMETER_ERROR = 9
SA_READ_ERROR = 10
SA_INTERNAL_ERROR = 12
SA_WRONG_M... | PypiClean |
/DeFCoM-1.0.0.tar.gz/DeFCoM-1.0.0/defcom/performance_stats.py | import uuid
import subprocess
from numpy import concatenate
from sklearn.metrics import roc_curve, auc
class PerformanceStats(object):
"""Methods for computing performance statistics."""
@classmethod
def pAUC(self, y_true, y_score, fpr_cutoff):
""" Calculate partial Area Under ROC (pAUC).
... | PypiClean |
/DataQualityFramework-0.0.7.tar.gz/DataQualityFramework-0.0.7/data_quality_framework/__init__.py |
# GNU AFFERO GENERAL PUBLIC LICENSE
# Version 3, 19 November 2007
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
# ... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py | import re
from nuitka.__past__ import intern
from nuitka.plugins.PluginBase import NuitkaPluginBase
class NuitkaPluginPylintEclipseAnnotations(NuitkaPluginBase):
plugin_name = "pylint-warnings"
plugin_desc = "Support PyLint / PyDev linting source markers"
def __init__(self):
self.line_annotation... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/lib/js/list.min.js | var List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t)... | PypiClean |
/DTest-0.5.0.tar.gz/DTest-0.5.0/dtest/capture.py | from StringIO import StringIO
import sys
from eventlet.corolocal import local
from dtest.exceptions import DTestException
# Globals needed for capturing
_installed = False
_saves = {}
class Capturer(object):
"""
Capturer
========
The Capturer class is an abstract class which keeps track of all
... | PypiClean |
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/structural_mechanics_solver.py | import KratosMultiphysics
# Import applications
import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication
# Importing the base class
from KratosMultiphysics.python_solver import PythonSolver
# Other imports
from KratosMultiphysics.StructuralMechanicsApplication import convergence_cri... | PypiClean |
/Flask-Filter-0.1.2a2.tar.gz/Flask-Filter-0.1.2a2/flask_filter/filters/filters.py | import abc
import datetime
import logging
import re
from typing import Any
from numbers import Number
from marshmallow.exceptions import ValidationError
logger = logging.getLogger(__name__)
RE_DATE = "^([0-9]{4})-([0-9]|1[0-2]|0[1-9])-([1-9]|0[1-9]|1[0-9]|2[1-9]|3[0-1])$"
class Filter(abc.ABC):
OP = None
... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/locale/lang/mn.js | 'use strict';
exports.__esModule = true;
exports.default = {
el: {
colorpicker: {
confirm: 'Тийм',
clear: 'Цэвэрлэх'
},
datepicker: {
now: 'Одоо',
today: 'Өнөөдөр',
cancel: 'Болих',
clear: 'Цэвэрлэх',
confir... | PypiClean |
/CMinx-1.1.9.tar.gz/CMinx-1.1.9/src/cminx/parser/CMakeLexer.py | from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\21")
buf.write("\u00e5\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7")
buf.write("\t\7\4\b\t\b... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/plugins/standard/UpxPlugin.py | """UPX plugin. """
import os
from nuitka.Options import isOnefileMode, isOnefileTempDirMode
from nuitka.plugins.PluginBase import NuitkaPluginBase
from nuitka.utils.AppDirs import getCacheDir
from nuitka.utils.Execution import executeToolChecked, getExecutablePath
from nuitka.utils.FileOperations import copyFile, mak... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/extensions/TeX/AMScd.js | MathJax.Extension["TeX/AMScd"]={version:"2.7.9",config:MathJax.Hub.CombineConfig("TeX.CD",{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:false})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,e=MathJax.InputJax.TeX,d=e.Stack.Item,c=... | PypiClean |
/NebulasSdkPy-0.4.0.tar.gz/NebulasSdkPy-0.4.0/nebpysdk/src/proto/generated/google/protobuf/internal/api_implementation.py | import os
import warnings
import sys
try:
# pylint: disable=g-import-not-at-top
from google.protobuf.internal import _api_implementation
# The compile-time constants in the _api_implementation module can be used to
# switch to a certain implementation of the Python API at build time.
_api_version = _api_impl... | PypiClean |
/Hotel_Lite-0.6.tar.gz/Hotel_Lite-0.6/Hotel_Lite/FuncionesHab.py | import sqlite3, threading
from Hotel_Lite import Variables, FuncionesGenericas, Conexion, FuncionesRes
from datetime import datetime
def limpiarEnt(fila):
for i in range(3,len(fila)):
fila[i].set_text("")
fila[1].set_active(True)
'''
Inserta un registro
'''
def insertarhab(registro):
try:
... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/doc/extdev/deprecated.rst | .. _dev-deprecated-apis:
Deprecated APIs
===============
On developing Sphinx, we are always careful to the compatibility of our APIs.
But, sometimes, the change of interface are needed for some reasons. In such
cases, we've marked them as deprecated. And they are kept during the two
major versions (for more details... | PypiClean |
/NuPlone-2.2.0.tar.gz/NuPlone-2.2.0/plonetheme/nuplone/tiles/tabs.py | from Acquisition import aq_inner
from plone import api
from plone.tiles import Tile
from plonetheme.nuplone.utils import getNavigationRoot
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import typesToList
from zExceptions import NotFound
class TabsTile(Tile):
def getRoot(self):
... | PypiClean |
/Echelon8_test-0.0.1.tar.gz/Echelon8_test-0.0.1/src/echelon.py | import plotly.graph_objs as go
import dash_html_components as html
import dash_core_components as dcc
import dash
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import statsmodels.api as sm
import datetime
import seaborn as sns
sns.set_style("darkgrid")
class EchelonBT():
def __init__(sel... | PypiClean |
/ECmean4-0.1.4.tar.gz/ECmean4-0.1.4/ecmean/utils/clim-create.py | __author__ = "Paolo Davini (p.davini@isac.cnr.it), Sep 2022."
import tempfile
from ecmean.libs.files import load_yaml
from ecmean.libs.units import units_extra_definition
from ecmean.libs.ncfixers import xr_preproc
from dask.distributed import Client, LocalCluster, progress
from ecmean.libs.climatology import full_his... | PypiClean |
/Freya_alerce-0.2.1.tar.gz/Freya_alerce-0.2.1/Freya_alerce/catalogs/PS1/configure.py | import requests
import io
import numpy as np
from astropy.io import ascii
from astropy.coordinates import SkyCoord
from astropy import units as u
from Freya_alerce.catalogs.core.abstract_catalog import BaseCatalog
from Freya_alerce.core.utils import Utils
class ConfigurePS1(BaseCatalog):
"""
Parameters:
-... | PypiClean |
/LDtoolsets-0.0.14.tar.gz/LDtoolsets-0.0.14/nbs/03_LDmatrix.ipynb | ```
# default_exp ldmatrix
```
# LDmatrix module
> Calculate LDmatrix
```
#hide
from nbdev.showdoc import *
#export
import torch
import numpy as np
import pandas as pd
import dask.array as da
#export
def geno_corr(x,y=None,step=100):
'''functions to calculate LD matrix'''
if y is None:
dd = dask_co... | PypiClean |
/Frontiersman-2.0.2-py3-none-any.whl/frontiersman/main/GameLobby.py | import sys, os
import pygame
import pygame.gfxdraw
import pygame_gui
from pygame_gui.core.utility import clipboard_copy
sys.path.insert(0, '../../frontiersman')
from frontiersman.client.ClientGraphics import ClientGraphics
from frontiersman.main.DrawHelper import DrawHelper
from frontiersman.main.PopUp import PopUp
#... | PypiClean |
/EAST-0.3.8.tar.gz/EAST-0.3.8/east/asts/easa.py |
import itertools
import numpy as np
from east.asts import base
from east.asts import utils
from east import utils as common_utils
class EnhancedAnnotatedSuffixArray(base.AST):
__algorithm__ = "easa"
def __init__(self, strings_collection):
super(EnhancedAnnotatedSuffixArray, self).__init__(strings_c... | PypiClean |
/Montreal-Forced-Aligner-3.0.0a3.tar.gz/Montreal-Forced-Aligner-3.0.0a3/.github/ISSUE_TEMPLATE/bug_report.md | ---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: mmcauliffe
---
**Debugging checklist**
[ ] Have you updated to latest MFA version?
[ ] Have you tried rerunning the command with the `--clean` flag?
**Describe the issue**
A clear and concise description of what the... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/plugins/widget/dev/assets/simplebox/plugin.js | 'use strict';
// Register the plugin within the editor.
CKEDITOR.plugins.add( 'simplebox', {
// This plugin requires the Widgets System defined in the 'widget' plugin.
requires: 'widget,dialog',
// Register the icon used for the toolbar button. It must be the same
// as the name of the widget.
icons: 'simplebox'... | PypiClean |
/Aj_Zsl_nlu-4.2.0-py3-none-any.whl/nlu/discovery.py | from nlu.spellbook import Spellbook
import nlu
from nlu.info import AllComponentsInfo
all_components_info = AllComponentsInfo()
class Discoverer:
"""Various methods that help discover nlu_refs and functionality"""
def __init__(self):
''' Initialize every NLU component_to_resolve info object and provide... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/widget/Pager.js | define(["dijit","dojo","dojox","dojo/require!dijit/_Widget,dijit/_Templated,dojo/fx"],function(_1,_2,_3){
_2.provide("dojox.widget.Pager");
_2.experimental("dojox.widget.Pager");
_2.require("dijit._Widget");
_2.require("dijit._Templated");
_2.require("dojo.fx");
_2.declare("dojox.widget.Pager",[_1._Widget,_1._Templated... | PypiClean |
/MeteorTools-2023.9.0-py3-none-any.whl/meteortools/fileformats/platepar.py |
import json
import os
import glob
class platepar:
""" Load and manage an RMS platepar object, used to map an image to the sky """
def __init__(self, plateparfile):
"""" Create and load a platepar object from a file plateparfile """
with open(plateparfile, 'r') as pp:
self.jsd = js... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/plugins/revealer/qt.py | import os
import random
import traceback
from decimal import Decimal
from functools import partial
import sys
import qrcode
from PyQt5.QtPrintSupport import QPrinter
from PyQt5.QtCore import Qt, QRectF, QRect, QSizeF, QUrl, QPoint, QSize
from PyQt5.QtGui import (QPixmap, QImage, QBitmap, QPainter, QFontDatabase, QPen,... | PypiClean |
/DenseNet-armhzjz-0.1.2.tar.gz/DenseNet-armhzjz-0.1.2/DenseNet/Models.py | import sys
import torch
import numpy as np
import torch.nn as nn
from DenseNet import Layers as lyr
from DenseNet import Training
class DenseNet(nn.Module):
def __init__(self, nLayers, tlayer="Bottleneck", k=32, compression_factor=0.5, nClasses=100, default_trainer=True):
super(DenseNet, self).__init__(... | PypiClean |
/NbRisk-35.1.0-py3-none-any.whl/nb_risk/navigation.py | from extras.plugins import PluginMenu, PluginMenuItem, PluginMenuButton
from utilities.choices import ButtonColorChoices
menu = PluginMenu(
label="Risk Assessment",
icon_class="mdi mdi-spider",
groups=(
(
"Threat",
(
PluginMenuItem(
permis... | PypiClean |
/LuaAutoDoc-0.9.1-py3-none-any.whl/lua_auto_doc/modules/highlighter/indexer_support_functions.py |
import re
from json import load
from importlib import resources
# pylint: disable=unused-import, unused-variable
from multiprocessing.connection import Connection
# pylint: enable=unused-import, unused-variable
# Regex patterns
# Type patterns
g_posix_line_end_pattern: re.Pattern = re.compile(r'''(.*\Z)''')
""" A pa... | PypiClean |
/LDS-org-0.2.1.tar.gz/LDS-org-0.2.1/lds_org.py | import os
import contextlib
import logging
import pprint
import requests
__version__ = '0.2.1'
CONFIG_URL = "https://tech.lds.org/mobile/ldstools/config.json"
ENV_USERNAME = 'LDSORG_USERNAME'
ENV_PASSWORD = 'LDSORG_PASSWORD'
logger = logging.getLogger("lds-org")
class Error(Exception):
"""Exceptions for module ... | PypiClean |
/BSMRes-1.0.2-py3-none-any.whl/Task/ROI Power Plot.py | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from PIL import Image
fig, ax2 = plt.subplots(figsize=(8, 10))
# Load the image and convert it to grayscale
img = Image.open("ROI Headmap.png").convert('L')
img_arr = np.array(img)
# Define the 1020 EEG system of electrodes with their correspondi... | PypiClean |
/Assign_GUP-2017.4.0.zip/Assign_GUP-2017.4.0/src/Assign_GUP/prop_mvc_view.py | import os, sys
from PyQt4 import QtCore, QtGui
import event_filters
import history
import general_mvc_model
import proposal_details
import qt_utils
import signals
import resources
import topics
UI_FILE = 'listview.ui'
PROPOSALS_TEST_FILE = os.path.join('project', '2015-2', 'proposals.xml')
class AGUP_Proposals_View... | PypiClean |
/GALFITools-1.0.0.tar.gz/GALFITools-1.0.0/src/galfitools/shell/commands_sky.py | import argparse
from galfitools.sky.GalfitSky import galfitSky
from galfitools.sky.Sky import sky
from galfitools.sky.SkyDs9 import SkyDs9
from galfitools.sky.SkyRing import SkyRing
from galfitools.shell.prt import printWelcome
def mainGalfitSky():
printWelcome()
parser = argparse.ArgumentParser(descrip... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/ChannelDownSymbol.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.