id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Strategy/Refresh.js
* @requires OpenLayers/Strategy.js */ /** * Class: OpenLayers.Strategy.Refresh * A strategy that refreshes the layer. By default the strategy waits for a * call to <refresh> before refreshing. By configuring the strategy with * the <interval> option, refreshing can take place automatically. * * Inher...
PypiClean
/Flask-Copilot-0.2.0.tar.gz/Flask-Copilot-0.2.0/README.rst
============================ Flask-Copilot |build status| ============================ .. |build status| image:: https://travis-ci.org/jonafato/Flask-Copilot.svg?branch=master :target: https://travis-ci.org/jonafato/Flask-Copilot Handling your app's navigation, so you don't have to. Resources ========= - `Documen...
PypiClean
/CleverHarold-0.1.tar.gz/CleverHarold-0.1/harold/form/responder/jsonexc.py
# Copyright 2006 The Incorporated Wizzo Widget Works # Distributed under the terms of the GNU General Public License v2 # Author: Troy Melhase <troy@gci.net> ## # JSON exception decorator # # The json decorator calls its decorated function normally, # and if there is an exception during the call, it instead returns t...
PypiClean
/Blogofile-0.8.3.tar.gz/Blogofile-0.8.3/blogofile/default_config.py
###################################################################### # Basic Settings # (almost all sites will want to configure these settings) ###################################################################### ## site.url -- Your site's full URL # Your "site" is the same thing as your _site directory. # If y...
PypiClean
/Henson_AMQP-0.9.0-py3-none-any.whl/Henson_AMQP-0.9.0.dist-info/DESCRIPTION.rst
########################## Henson-AMQP |build status| ########################## .. |build status| image:: https://travis-ci.org/iheartradio/Henson-AMQP.svg?branch=master :target: https://travis-ci.org/iheartradio/Henson-AMQP A library for interacting with AMQP with a Henson application. * `Documentation <https:...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/polys/rings.py
from __future__ import annotations import functools import math import operator from ..config import query from ..core import Expr, Integer, Symbol, cacheit from ..core import symbols as _symbols from ..core.compatibility import is_sequence from ..core.sympify import CantSympify, sympify from ..domains.compositedoma...
PypiClean
/CHASM_NuSpacesim-1.0.0.tar.gz/CHASM_NuSpacesim-1.0.0/demo/.ipynb_checkpoints/Custom_Distribution_Example-checkpoint.ipynb
CHASM allows for users to implement custom parameterizations for the charged particle energy and angular distribution. This notebook demonstrates how custom custom charged particle distributions can be used to create Cherenkov light angular distribution. ``` from CHASM.charged_particle_ABC import * import numpy as np...
PypiClean
/GoogleAppEngineMapReduce-1.9.22.0.tar.gz/GoogleAppEngineMapReduce-1.9.22.0/mapreduce/status.py
__author__ = ("aizatsky@google.com (Mike Aizatsky)", "bslatkin@google.com (Brett Slatkin)") import os import pkgutil import time import zipfile from google.appengine.api import validation from google.appengine.api import yaml_builder from google.appengine.api import yaml_errors from google.appengine.api...
PypiClean
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Armadillo/UNet/training.py
import os.path import sys import torch # DeepPhysX related imports from DeepPhysX.Core.Pipelines.BaseTraining import BaseTraining from DeepPhysX.Core.Database.BaseDatabaseConfig import BaseDatabaseConfig from DeepPhysX.Torch.UNet.UNetConfig import UNetConfig from DeepPhysX.Sofa.Environment.SofaEnvironmentConfig import...
PypiClean
/ArchivViewer-3.tar.gz/ArchivViewer-3/archivviewer/archivviewer.py
import sys, codecs, os, fdb, json, tempfile, shutil, subprocess, io, winreg, configparser from datetime import datetime, timedelta from collections import OrderedDict from contextlib import contextmanager from pathlib import Path from lhafile import LhaFile from PyPDF2 import PdfFileMerger import img2pdf from PyQt5.Qt...
PypiClean
/ButterflyNet-1.1.0-py3-none-any.whl/bfnet/util.py
import struct def infer_int_pack(arg) -> str: """ Attempt to infer the correct struct format for an int. :param arg: The integer argument to infer. :return: A character for the struct string. """ # Short if (-32768) <= arg <= 32767: return "h" # Int elif (-2147483648) <= ar...
PypiClean
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/glob2/glob2/fnmatch.py
import os import re try: from functools import lru_cache except ImportError: from .compat import lru_cache __all__ = ["filter", "fnmatch", "fnmatchcase", "translate"] def _norm_paths(path, norm_paths, sep): if norm_paths is None: path = re.sub(r'\/', sep or os.sep, path) # cached internally ...
PypiClean
/K-Format-0.3.0.tar.gz/K-Format-0.3.0/README.md
# K-Format [![Build Status](https://travis-ci.org/Rainist/K-Format.svg?branch=master)](https://travis-ci.org/Rainist/K-Format) [![PyPI](https://img.shields.io/pypi/v/K-Format.svg)](https://badge.fury.io/py/K-Format) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/K-Format.svg)](https://badge.fury.io/p...
PypiClean
/Boutique-0.1.3.tar.gz/Boutique-0.1.3/boutiqueclient/bservice/cmds/auth.py
import sys import getpass from path import path from boutiqueclient.bservice.api.error import ApiUnauthorizedError from .base import BaseCommand class Login(BaseCommand): """Log in with your boutique credentials.""" def run(self): success = False retries, retry = 3, 0 sys.stdout.write('Enter your ...
PypiClean
/MDAnalysis-2.1.0.tar.gz/MDAnalysis-2.1.0/doc/sphinx/source/documentation_pages/trajectory_transformations.rst
.. Contains the formatted docstrings for the transformations located in 'mdanalysis/MDAnalysis/transformations' .. _transformations: ********************************************************* Trajectory transformations ("on-the-fly" transformations) ********************************************************* .. module::...
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/tag_single.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
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/tl/functions/langpack.py
from ...tl.tlobject import TLObject from ...tl.tlobject import TLRequest from typing import Optional, List, Union, TYPE_CHECKING import os import struct from datetime import datetime class GetDifferenceRequest(TLRequest): CONSTRUCTOR_ID = 0xcd984aa5 SUBCLASS_OF_ID = 0x52662d55 def __init__(self, lang_pac...
PypiClean
/Frontiersman-2.0.2-py3-none-any.whl/frontiersman/gameboard/Board.py
class Vertex: def __init__(self, location=(0, 0, 0)): self.location = location self.neighbors = [None, None, None] class Tile: def __init__(self, resource='Wheat', location=(0, 0, 0)): self.__resource = resource self.__robber = False self.__location = location s...
PypiClean
/JacksonQuery-0.0.1-py3-none-any.whl/portfolio_optimization/optimization_model.py
import bt import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates from tqdm import tqdm from pypfopt import efficient_frontier, objective_functions from . import optimization_config as oc from . import optimization_inputs as oi from . import optimization_data as od from ...
PypiClean
/MODOI-1.0.tar.gz/MODOI-1.0/SimulationClient/CustomBFGS.py
import numpy as np from scipy.optimize import minpack2 import LinearAlgebra as la from Geometric import Length, GradLength from MetricValues import get_metric def find_geodesic_midpoint(start_point, end_point, number_of_inner_points, basis_rotation_matrix, tangent_direction, codimension, m...
PypiClean
/Gnotty-0.2.7.tar.gz/Gnotty-0.2.7/gnotty/static/js/jquery.tmpl.min.js
(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},h=0,c=0,l=[];function g(e,d,g,i){var c={data:i||(d?d.data:{}),_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};e&&a.extend(c,e,{nodes:[],parent:d});if(g){c.tmpl=g...
PypiClean
/MokaPlayer-0.8.5.7.tar.gz/MokaPlayer-0.8.5.7/mokaplayer/core/fetchers/tabs/provider_ultimateguitar.py
import logging import os import re import json import requests from lxml import html class ProviderUltimateGuitar(): SEARCH_URL = 'https://www.ultimate-guitar.com/search.php' DOWNLOAD_URL = 'https://tabs.ultimate-guitar.com/tab/download' @staticmethod def __get_json_data_in_page(page): json...
PypiClean
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/ssn/no_NO/__init__.py
import datetime import operator from typing import List, Optional, Sequence from ....typing import SexLiteral from .. import Provider as SsnProvider def checksum(digits: Sequence[int], scale: List[int]) -> int: """ Calculate checksum of Norwegian personal identity code. Checksum is calculated with "Mod...
PypiClean
/FFEAT-1.0.0-py3-none-any.whl/ffeat/utils/decay/Linear.py
from typing import Union _IFU = Union[int, float] class Linear: """ Linear decay rate, parameter decreases linearly from `start` to `min`. """ def __init__(self, start: _IFU, min: _IFU = None, step: _IFU = None, result_type=float): ...
PypiClean
/ChunkyPipes-0.2.4.tar.gz/ChunkyPipes-0.2.4/README.rst
ChunkyPipes =========== .. image:: https://img.shields.io/pypi/v/chunkypipes.svg :target: https://pypi.python.org/pypi/chunkypipes/ :alt: Latest Version .. image:: https://img.shields.io/pypi/dm/chunkypipes.svg :target: https://pypi.python.org/pypi/chunkypipes/ :alt: Downloads .. image:: https://img....
PypiClean
/AutoTorch-0.0.2b20200818.tar.gz/AutoTorch-0.0.2b20200818/autotorch/scheduler/resource/manager.py
import logging import multiprocessing as mp from .resource import * from ...utils import Queue __all__ = ['ResourceManager'] logger = logging.getLogger(__name__) class ResourceManager(object): """Resource Manager to keep track of the cpu and gpu usage """ LOCK = mp.Lock() CPU_QUEUE = Queue() GPU_...
PypiClean
/CMinx-1.1.9.tar.gz/CMinx-1.1.9/docs/source/developer/overview.rst
.. Copyright 2021 CMakePP .. .. 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,...
PypiClean
/Mopidy-Touchscreen-1.0.0.tar.gz/Mopidy-Touchscreen-1.0.0/mopidy_touchscreen/screens/playlist_screen.py
from base_screen import BaseScreen from ..graphic_utils import ListView class PlaylistScreen(BaseScreen): def __init__(self, size, base_size, manager, fonts): BaseScreen.__init__(self, size, base_size, manager, fonts) self.list_view = ListView((0, 0), ( self.size[0], self.size[1] - ...
PypiClean
/Eureqa-1.76.0.tar.gz/Eureqa-1.76.0/eureqa/analysis/components/box_plot.py
from eureqa.analysis.components.base import _TwoVariablePlotComponent from eureqa.utils.jsonrest import _JsonREST class BoxPlot(_TwoVariablePlotComponent): """Represents a box plot card on the server. Example:: bp = BoxPlot(d, axis_labels={'x': 'the x var', 'y' : 'the y var'}, label_format={'y':'.3s'...
PypiClean
/FAT-Forensics-0.1.2.tar.gz/FAT-Forensics-0.1.2/README.rst
.. -*- mode: rst -*- ============= ================================================================ Software |Licence|_ |GitHubRelease|_ |PyPi|_ |Python35|_ Docs |Homepage|_ CI |GitHubTests|_ |GitHubDocs|_ |Codecov|_ Try it |Binder|_ Contact |MailingList|_ |Gitter|_ Cite ...
PypiClean
/MIAvisual-0.0.6-py3-none-any.whl/matplotlib/bezier.py
from functools import lru_cache import math import warnings import numpy as np from matplotlib import _api # same algorithm as 3.8's math.comb @np.vectorize @lru_cache(maxsize=128) def _comb(n, k): if k > n: return 0 k = min(k, n - k) i = np.arange(1, k + 1) return np.prod((n + 1 - i)/i).ast...
PypiClean
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/modules/classifiers/conv_classifiers.py
import sys from typing import Any, Dict, List, Optional, Tuple, Union import torch from torch import nn from BIT_DL.pytorch.hyperparams import HParams from BIT_DL.pytorch.modules.classifiers.classifier_base import ClassifierBase from BIT_DL.pytorch.modules.encoders.conv_encoders import Conv1DEncoder from BIT_DL.pytor...
PypiClean
/LwmaL_mess_client-0.8.7.tar.gz/LwmaL_mess_client-0.8.7/client/main_window.py
from PyQt5.QtWidgets import QMainWindow, qApp, QMessageBox, QApplication, QListView from PyQt5.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor from PyQt5.QtCore import pyqtSlot, QEvent, Qt from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA import json import logging import base64 from...
PypiClean
/Argaeus-0.1.10.tar.gz/Argaeus-0.1.10/argaeus/controller/operationcontroller.py
from argaeus.controller.acontroller import AController class OperationController(AController): """ This controller is responsible whether the Themostat is operating in observation or in control mode. Thus, if the output of the DAC is connected to the heating system or not. It registers to this topic:...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/ding/policy/rainbow.py
from typing import List, Dict, Any, Tuple, Union import torch import copy from ding.torch_utils import Adam, to_device from ding.rl_utils import dist_nstep_td_data, dist_nstep_td_error, get_train_sample, get_nstep_return_data from ding.model import model_wrap from ding.utils import POLICY_REGISTRY from ding.utils.data...
PypiClean
/Chorus-0.9.0.tar.gz/Chorus-0.9.0/chorus/util/debug.py
import os import sys import cProfile import pstats import linecache import tracemalloc from itertools import chain from collections import deque def profile(func): """ Decorator Execute cProfile """ def _f(*args, **kwargs): print("\n<<<---") pr = cProfile.Profile() pr.enable()...
PypiClean
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/metrics/wrapper.py
from calendar import monthrange from datetime import date, timedelta from typing import Dict from django.core.cache import cache from django.utils.functional import cached_property from django.utils.translation import pgettext_lazy from weblate.metrics.models import METRIC_CHANGES, Metric MONTH_NAMES = [ pgette...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/necks/nas_fpn.py
import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops.merge_cells import GlobalPoolingCell, SumCell from mmcv.runner import BaseModule, ModuleList from ..builder import NECKS @NECKS.register_module() class NASFPN(BaseModule): """NAS-FPN. Implementation of `NAS-FPN: Learning Scalable Feature Py...
PypiClean
/Mtrax-2.2.07.zip/Mtrax-2.2.07/mtrax/FlyMovieFormat.py
import sys import struct import warnings import os.path import numpy as nx from numpy import nan import time import math # version 1 formats: VERSION_FMT = '<I' FORMAT_LEN_FMT = '<I' BITS_PER_PIXEL_FMT = '<I' FRAMESIZE_FMT = '<II' CHUNKSIZE_FMT = '<Q' N_FRAME_FMT = '<Q' TIMESTAMP_FMT = 'd' # XXX struct.pack('<d',n...
PypiClean
/Flask-AWSCognito-1.3.tar.gz/Flask-AWSCognito-1.3/flask_awscognito/services/cognito_service.py
from base64 import b64encode from urllib.parse import quote import requests from flask_awscognito.utils import get_state from flask_awscognito.exceptions import FlaskAWSCognitoError class CognitoService: def __init__( self, user_pool_id, user_pool_client_id, user_pool_client_secret...
PypiClean
/ATpy-0.9.7.tar.gz/ATpy-0.9.7/atpy/asciitables.py
from __future__ import print_function, division import os from .decorators import auto_download_to_file, auto_decompress_to_fileobj # Thanks to Moritz Guenther for providing the initial code used to create this file from astropy.io import ascii def read_cds(self, filename, **kwargs): ''' Read data from a ...
PypiClean
/MCPI_Addons-1.2.0-py3-none-any.whl/mcpi_addons/entity.py
class Entity: """Minecraft PI entity description. Can be sent to Minecraft.spawnEntity""" def __init__(self, id, name=None): self.id = id self.name = name def __cmp__(self, rhs): return hash(self) - hash(rhs) def __eq__(self, rhs): return self.id == rhs.id def __h...
PypiClean
/Django-Accounts-0.1.tar.gz/Django-Accounts-0.1/accounts/urls.py
# 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, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # bu...
PypiClean
/FlexTransform-1.2.1-py3-none-any.whl/ISAMarkingExtension/isamarkingsacs30.py
import ISAMarkingExtension.bindings.isamarkings as isa_binding import stix.data_marking from stix.data_marking import MarkingStructure class ISAMarkingStructure30(MarkingStructure): ''' This marking extension was created to apply the SD-EDH Cyber Profile to ISA shared documents. This is one of two extensi...
PypiClean
/Mroylib-1.3.0.tar.gz/Mroylib-1.3.0/qlib/file/__file.py
import os import re import sys import time import zipfile from hashlib import md5 from termcolor import cprint, colored from base64 import b64encode, b64decode from io import BytesIO from qlib.log import LogControl LogControl.LOG_LEVEL = LogControl.WRN j = os.path.join def to_save(line,ty,root_dir): if not os.p...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/themes/Electric.js.uncompressed.js
define("dojox/charting/themes/Electric", ["../Theme", "dojox/gfx/gradutils", "./common"], function(Theme, gradutils, themes){ var g = Theme.generateGradient, defaultFill = {type: "linear", space: "shape", x1: 0, y1: 0, x2: 0, y2: 75}; themes.Electric = new Theme({ chart: { fill: "#252525", stroke: ...
PypiClean
/MakkaPakka-1.0.4.tar.gz/MakkaPakka-1.0.4/src/makka_pakka/integrating/integrate.py
from pathlib import Path from typing import List from uuid import uuid4 from makka_pakka import settings from makka_pakka.exceptions.exceptions import ErrorType from makka_pakka.exceptions.exceptions import MKPKIntegratingError from makka_pakka.exceptions.exceptions import MKPKInvalidParameter from makka_pakka.parsing...
PypiClean
/BioSAK-1.72.0.tar.gz/BioSAK-1.72.0/My_Python_scripts/tree_related/tree_ploter.py
from ete3 import Tree, TreeStyle, NodeStyle, TextFace # tree: tree in newick format # tree type: species tree or gene tree # name_list: if one node in name_list, it's name will be displayed in red def plot_gene_tree(tree, tree_type, gene_name, tree_file_name, name_list, tree_image_folder): # set tree parameters ...
PypiClean
/InformativeFeatureSelection-3.0.0.tar.gz/InformativeFeatureSelection-3.0.0/feature_extractor/common/DiscriminantAnalysis.py
from abc import ABC, abstractmethod from typing import Tuple, Union, List, Any import numpy as np from scipy import linalg from numba import njit from sklearn.covariance import empirical_covariance def _cov(X): """Estimate covariance matrix (using optional covariance_estimator). Parameters ---------- ...
PypiClean
/NREL_sup3r-0.1.0-py3-none-any.whl/sup3r/models/wind_conditional_moments.py
"""Wind conditional moment estimator with handling of low and high res topography inputs.""" import logging import tensorflow as tf from sup3r.models.abstract import AbstractWindInterface from sup3r.models.conditional_moments import Sup3rCondMom logger = logging.getLogger(__name__) class WindCondMom(AbstractWindIn...
PypiClean
/BalazarBrothers-1.1.tar.gz/BalazarBrothers-1.1/init_editobj.py
import weakref, time import soya import balazar_brothers import balazar_brothers.main_loop from balazar_brothers.bonus import * from balazar_brothers.platform import * from balazar_brothers.trap import * from balazar_brothers.level import Level import editobj, editobj.main, editobj.editor as editor, edito...
PypiClean
/OWSLib-0.29.2.tar.gz/OWSLib-0.29.2/owslib/swe/observation/waterml2.py
from owslib.util import nspath_eval from owslib.namespaces import Namespaces from owslib.util import testXMLAttribute, testXMLValue from owslib.swe.common import Quantity from dateutil import parser from owslib.swe.observation.om import OM_Observation, Result def get_namespaces(): ns = Namespaces() return ns....
PypiClean
/Driver_zch-3.2.0.tar.gz/Driver_zch-3.2.0/zhouch23/notifier.py
from typing import Iterable, List, Optional, Union from can.bus import BusABC from can.listener import Listener from can.message import Message import threading import logging import time import asyncio logger = logging.getLogger("can.Notifier") class Notifier: def __init__( self, bus: BusABC, ...
PypiClean
/KratosShallowWaterApplication-9.4-cp311-cp311-win_amd64.whl/KratosMultiphysics/ShallowWaterApplication/benchmarks/mac_donald_shock_benchmark.py
import KratosMultiphysics as KM import KratosMultiphysics.ShallowWaterApplication as SW from KratosMultiphysics.ShallowWaterApplication.benchmarks.base_benchmark_process import BaseBenchmarkProcess from KratosMultiphysics.process_factory import Factory as ProcessFactory # Other imports import numpy as np from scipy.i...
PypiClean
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_fi.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
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/grid/enhanced/plugins/Menu.js
if(!dojo._hasResource["dojox.grid.enhanced.plugins.Menu"]){ dojo._hasResource["dojox.grid.enhanced.plugins.Menu"]=true; dojo.provide("dojox.grid.enhanced.plugins.Menu"); dojo.declare("dojox.grid.enhanced.plugins.Menu",null,{constructor:function(_1){ _1.mixin(_1,this); },_initMenus:function(){ var _2=this.menuContainer;...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/plugins/filebrowser/plugin.js
* @fileOverview The "filebrowser" plugin that adds support for file uploads and * browsing. * * When a file is uploaded or selected inside the file browser, its URL is * inserted automatically into a field defined in the <code>filebrowser</code> * attribute. In order to specify a field that should b...
PypiClean
/Balert-1.1.8.tar.gz/Balert-1.1.8/balert/BatteryStatus.py
from Bsettings import Bpath from Bsettings import SetLevel from Config import Config import logging import os class Battery(Bpath, Config): """ Module to fetch battery status """ def __init__(self): if not os.access(Bpath.POWER_SUPPLY_PATH, os.R_OK): raise RuntimeError("Unable...
PypiClean
/FoLiA-tools-2.5.4.tar.gz/FoLiA-tools-2.5.4/foliatools/foliaquery.py
from __future__ import print_function, unicode_literals, division, absolute_import import getopt import sys import os import glob from folia import fql import folia.main as folia def usage(): print("foliaquery",file=sys.stderr) print(" by Maarten van Gompel (proycon)",file=sys.stderr) print(" Radboud Un...
PypiClean
/AwesomeTkinter-2021.11.8-py3-none-any.whl/awesometkinter/tooltip.py
import tkinter as tk from tkinter import font as tkfont from tkinter import ttk __package__ = 'awesometkinter' from .utils import configure_widget class ToolTip: def __init__(self, widget, text, waittime=500, xoffset=10, yoffset=10, **kwargs): """ tooltip class Args: widget...
PypiClean
/AFQ-Browser-0.3.tar.gz/AFQ-Browser-0.3/afqbrowser/site/client/js/third-party/dat.gui.min.js
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dat=t():e.dat=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(...
PypiClean
/DTMC/spatialModel/PeriodicMovement/periodicSIR.py
import numpy as np import pandas as pd from matplotlib import pyplot as plt from math import pi, cos, sin from ..randomMovement.randMoveSIR import RandMoveSIR from Eir.DTMC.spatialModel.simul_details import Simul_Details from Eir.utility import Person2 as Person from Eir.utility import randEvent, dist class PeriodicS...
PypiClean
/CNVkit-0.9.10-py3-none-any.whl/cnvlib/scatter.py
import collections import logging import numpy as np from matplotlib import pyplot from skgenome.rangelabel import unpack_range from . import core, params, plots from .plots import MB from .cnary import CopyNumArray as CNA HIGHLIGHT_COLOR = "gold" POINT_COLOR = "#606060" SEG_COLOR = "darkorange" TREND_COLOR = "#A0A0...
PypiClean
/Kotti-2.0.9.tar.gz/Kotti-2.0.9/docs/developing/advanced/close-to-anonymous.rst
.. _close-to-anonymous: Close your site to anonymous users ================================== This recipe describes how to configure Kotti to require users to log in before they can view any of your site's pages. To achieve this, we'll have to set our site's ACL. A custom populator will help us do that (see :ref:`k...
PypiClean
/HippodamiaAgent-0.1.12.tar.gz/HippodamiaAgent-0.1.12/hippodamia_agent/states/active.py
from hippodamia_agent.states.aagentstate import AAgentState from hippodamia_agent.states.event_ids import event_ids from asyncscheduler import AsyncScheduler class Active(AAgentState): send_config = None send_config_interval = 0 send_ping = None send_ping_interval = 0 send_runtime = None send_...
PypiClean
/DNBC4tools-2.1.0.tar.gz/DNBC4tools-2.1.0/dnbc4tools/rna/count.py
import os from dnbc4tools.tools.utils import str_mkdir,logging_call,judgeFilexits,change_path,bin_path from dnbc4tools.__init__ import __root_dir__ def get_barcode(raw,hex_barcode): from dnbc4tools.tools.utils import seq_comp import pandas as pd barcode_all = pd.read_table(raw,sep = '\t',header=None) b...
PypiClean
/Django-ConfPages-0.1.1.tar.gz/Django-ConfPages-0.1.1/confpages/views.py
from __future__ import absolute_import import requests from django.views.generic import View from django.shortcuts import render from django.http import ( HttpResponse, HttpResponseForbidden, HttpResponseNotAllowed, HttpResponseServerError ) from django.template import Template, Context from django.uti...
PypiClean
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/resources/coverages/management/commands/collection.py
from django.core.management.base import CommandError, BaseCommand from django.db import transaction from eoxserver.resources.coverages import models from eoxserver.resources.coverages.management.commands import ( CommandOutputMixIn, SubParserMixIn ) class Command(CommandOutputMixIn, SubParserMixIn, BaseCommand)...
PypiClean
/MetPyQC-0.1.1-py3-none-any.whl/metpyqc/spatial.py
import numpy as np import pandas as pd from tqdm import tqdm from . import calculate as calc from sklearn import linear_model def hubbard_consistency(lat, lon, x, start_test, end_test, n_max, t_max, search_radius, min_neigh, missing_perc, f, flag_val): r""" Hubbard spatial weighted regr...
PypiClean
/Discord%20Anti-Spam-1.8.1.tar.gz/Discord Anti-Spam-1.8.1/antispam/caches/redis/redis.py
from __future__ import annotations import asyncio import datetime import logging from copy import deepcopy from typing import TYPE_CHECKING, List, AsyncIterable, Dict, cast from attr import asdict import orjson as json from antispam.abc import Cache from antispam.enums import ResetType from antispam.exceptions impo...
PypiClean
/Flask-Script-2.0.6.tar.gz/Flask-Script-2.0.6/docs/index.rst
Flask-Script ====================================== .. module:: Flask-Script The **Flask-Script** extension provides support for writing external scripts in Flask. This includes running a development server, a customised Python shell, scripts to set up your database, cronjobs, and other command-line tasks that belong...
PypiClean
/IPlantUML-0.1.1.tar.gz/IPlantUML-0.1.1/README.rst
.. image:: https://travis-ci.org/jbn/IPlantUML.svg?branch=master :target: https://travis-ci.org/jbn/IPlantUML What is it? =========== This Python package defines a `PlantUML <http://plantuml.com/>`__ cell magic for IPython. It lets you generate UML diagrams as inline SVG in your notebook. I'll add embellishments ...
PypiClean
/CheckMates-0.2.0-py3-none-any.whl/checkmates/objectives/utils.py
from typing import Optional import pandas as pd from checkmates import objectives from checkmates.exceptions import ObjectiveCreationError, ObjectiveNotFoundError from checkmates.objectives.objective_base import ObjectiveBase from checkmates.problem_types import ProblemTypes, handle_problem_types from checkmates.util...
PypiClean
/Copreus-0.4.0.tar.gz/Copreus-0.4.0/copreus/drivers/epaperdirect.py
from copreus.baseclasses.aepaper import AEPaper from copreus.baseclasses.aepaper import EPaperMQTTMessageConverter from time import sleep import queue from pelops.mythreading import LoggerThread import threading from enum import Enum from copreus.schema.epaperdirect import get_schema class TaskType(Enum): """Task...
PypiClean
/Hydro_Quebec_API_Wrapper-3.0.8-py3-none-any.whl/hydroqc/contract/common.py
import functools import logging from abc import ABC from collections.abc import Callable, Iterator from datetime import date, datetime, timedelta from io import StringIO from typing import ParamSpec, TypeVar, cast from hydroqc.contract.outage import Outage from hydroqc.hydro_api.client import HydroClient from hydroqc....
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/interfaces/chatbot/chatbot_executor.py
from .model_executor import ModelExecutor from .types import Function, BotException class BotExecutor: def __init__(self, chat_task, chat_memory): self.chat_task = chat_task self.chat_memory = chat_memory def _get_model(self, model_name): return ModelExecutor(self.chat_task, model_nam...
PypiClean
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/lib/exchange_rate.py
from datetime import datetime import inspect import requests import sys import os import json from threading import Thread import time import csv import decimal from decimal import Decimal from .bitcoin import COIN from .i18n import _ from .util import PrintError, ThreadJob # See https://en.wikipedia.org/wiki/ISO_42...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/migrations/versions/2021-11-30_17c3d2384711_init.py
import datetime from alembic.autogenerate import produce_migrations, render, api from alembic import context from sqlalchemy import UniqueConstraint from sqlalchemy.orm import declarative_base from sqlalchemy import Column, Integer, String, DateTime, Boolean, Index # required for code execution from alembic import op...
PypiClean
/NanoCap-1.0b12.tar.gz/NanoCap-1.0b12/nanocap/core/minimisation.py
from nanocap.core.globals import * import os,sys,math,copy,random,time,threading,Queue,ctypes import numpy from scipy.optimize import fmin_l_bfgs_b,fmin import nanocap.core.forcefield as forcefield from nanocap.core.points import Points from nanocap.core.util import * from nanocap.clib import clib_interface clib = ...
PypiClean
/M2CryptoWin64-0.21.1-3.tar.gz/M2CryptoWin64-0.21.1-3/M2Crypto/BIO.py
import m2 # Deprecated from m2 import bio_do_handshake as bio_do_ssl_handshake from cStringIO import StringIO class BIOError(Exception): pass m2.bio_init(BIOError) class BIO: """Abstract object interface to the BIO API.""" m2_bio_free = m2.bio_free def __init__(self, bio=None, _pyfree=0, _close_cb=...
PypiClean
/Instrumental-lib-0.7.zip/Instrumental-lib-0.7/instrumental/drivers/scopes/rigol.py
import visa from pyvisa.constants import InterfaceType import numpy as np from pint import UndefinedUnitError from . import Scope from .. import VisaMixin, SCPI_Facet, Facet from ..util import visa_context from ... import u, Q_ from enum import Enum from .. import ParamSet from visa import ResourceManager from enum imp...
PypiClean
/Joson_yaml_pytest-1.2.7-py3-none-any.whl/Joson_yaml_pytest/plugin.py
import types import yaml from pathlib import Path from _pytest.python import Module import pytest from requests.adapters import HTTPAdapter from . import http_session from . import runner from .log import set_log_format, log from .report_notify import ding_ding_notify, fei_shu_notify from .create_funtion import import_...
PypiClean
/Kotti-2.0.9.tar.gz/Kotti-2.0.9/docs/developing/advanced/blobs.rst
.. _blobs: Working with Blob Data in Kotti =============================== Kotti provides flexible mechanisms for storing and serving blob data by with the help of `Depot`_. .. contents:: How File-like Content is stored ------------------------------- Both ``File`` and ``Image`` store their data in :class:`depot.f...
PypiClean
/CCC-2.0.1.tar.gz/CCC-2.0.1/ccc/contacts/api/views.py
import xlwt from accounts.models import Account from django.db import transaction from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404 from django_filters.rest_framework import DjangoFilterBackend from rest_framework import status from rest_framework.decorators import action...
PypiClean
/My-Serializer-For-Json-And-XML-For_Lab3-9-1.4.tar.gz/My-Serializer-For-Json-And-XML-For_Lab3-9-1.4/Serializators/XML.py
from Core.functions_for_deserialize import Deserialize from Core.functions_for_serializer import Serialize class XMLSerializer: data_serializer = Serialize() data_deserializer = Deserialize() def dumps(self, obj): packed = self.data_serializer.serialize(obj) if isinstance(packed, (list, t...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/dnd/Manager.js.uncompressed.js
define("dojo/dnd/Manager", ["../main", "../Evented", "./common", "./autoscroll", "./Avatar"], function(dojo, Evented) { // module: // dojo/dnd/Manager // summary: // TODOC var Manager = dojo.declare("dojo.dnd.Manager", [Evented], { // summary: // the manager of DnD operations (usually a singleton) construct...
PypiClean
/DEME-0.2.8.tar.gz/DEME-0.2.8/thirdparty/pybind11/docs/advanced/pycpp/numpy.rst
.. _numpy: NumPy ##### Buffer protocol =============== Python supports an extremely general and convenient approach for exchanging data between plugin libraries. Types can expose a buffer view [#f2]_, which provides fast direct access to the raw internal data representation. Suppose we want to bind the following sim...
PypiClean
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/vector/coordsysrect.py
from ..core import Basic, Symbol, cacheit from ..matrices import ImmutableMatrix, eye from ..simplify import trigsimp from .orienters import (AxisOrienter, BodyOrienter, Orienter, QuaternionOrienter, SpaceOrienter) from .scalar import BaseScalar class CoordSysCartesian(Basic): """Represent...
PypiClean
/MindYourNeighbors-1.0.0.tar.gz/MindYourNeighbors-1.0.0/src/mind_your_neighbors/cache.py
import json import logging from os import path from functools import wraps logger = logging.getLogger('MindYourNeighbors') def _read_cache(file_path): if path.exists(file_path): with open(file_path, 'r') as fp: return json.load(fp) return {} def _write_cache(file_path, cache): with ...
PypiClean
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/TestNetworkShareREDFISH.py
import argparse import getpass import json import logging import re import requests import sys import time import warnings from datetime import datetime from pprint import pprint warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(description="Python script using Redfish API with OEM extension to tes...
PypiClean
/BraTS_Toolkit-1.0.5-py3-none-any.whl/brats_toolkit/preprocessor.py
import socketio from brats_toolkit.util.docker_functions import start_docker, stop_docker, update_docker import os import tempfile from pathlib import Path from brats_toolkit.util.prep_utils import tempFiler import sys class Preprocessor(object): def __init__(self, noDocker=False): # settings sel...
PypiClean
/Brain-Brew-0.3.10.tar.gz/Brain-Brew-0.3.10/brain_brew/representation/generic/csv_file.py
import csv import re import logging from enum import Enum from typing import List from brain_brew.representation.generic.source_file import SourceFile from brain_brew.utils import list_of_str_to_lowercase, sort_dict _encoding = "utf-8" class CsvKeys(Enum): GUID = "guid" TAGS = "tags" class CsvFile(SourceF...
PypiClean
/BMI500caonia-2.0.0.tar.gz/BMI500caonia-2.0.0/README.md
# The Kmeans unsupervised clustering package # Contents This package is an example Kmeans' package for BMI500's project in Emory University. The package will automatically download the iris data collected from UCI. The dataset contains three classes of flowers, and the clustering algorithm is to seperate each group of...
PypiClean
/HR_Neural_Networks-1.0.6.tar.gz/HR_Neural_Networks-1.0.6/HR_Neural_Networks/HR.py
import cvxpy as cp import torch import numpy as np from torch.autograd import Variable import torchattacks import warnings import mosek import os import torch.nn as nn import time import warnings warnings.filterwarnings("ignore") os.environ['MOSEKLM_LICENSE_FILE'] = "mosek.lic" class HR_Neural_Networks: def __ini...
PypiClean
/DAQC2apps-1.000.tar.gz/DAQC2apps-1.000/piplates/Applications/QTmotor.py
import sys import os import subprocess from functools import partial try: from PyQt4 import QtGui, QtCore, uic except ImportError: os.system("lxterminal -e 'python QTinstall.py'") sys.exit() try: import piplates.DAQC2plate as DAQC2 except ImportError: os.system("lxterminal -e 'python py23install...
PypiClean
/MyNQL-0.2.1.tar.gz/MyNQL-0.2.1/README.rst
Install ------- MyNLQ’s source code hosted on `GitHub <https://github.com/livinter/MyNQL>`_. .. code-block:: bash git clone https://github.com/livinter/MyNQL.git python setup.py install or just .. code-block:: bash pip install MyNQL Teach the Network ----------------- For example if a customer make a...
PypiClean
/Flask-Bootstrap4-4.0.2.tar.gz/Flask-Bootstrap4-4.0.2/flask_bootstrap/__init__.py
import re from flask import Blueprint, current_app, url_for try: from wtforms.fields import HiddenField except ImportError: def is_hidden_field_filter(field): raise RuntimeError('WTForms is not installed.') else: def is_hidden_field_filter(field): return isinstance(field, HiddenField) ...
PypiClean
/LeoX-0.6.1-py3-none-any.whl/lx/batch_lx.py
import os import time import subprocess import numpy as np import sys import shutil import lx.tools ##CHECKS WHETHER THE JOB IS TWO STEP########################### def set_factor(file): factor = 1 with open(file, 'r') as f: for line in f: if 'Link1' in line: factor ...
PypiClean
/ConSSL-0.0.1-py3-none-any.whl/CSSL/models/vision/segmentation.py
from argparse import ArgumentParser import pytorch_lightning as pl import torch from torch.nn import functional as F from CSSL.models.vision.unet import UNet class SemSegment(pl.LightningModule): def __init__( self, lr: float = 0.01, num_classes: int = 19, num_layers: int = 5, ...
PypiClean
/MetaPathways-3.1.6.tar.gz/MetaPathways-3.1.6/metapathways/scripts/MetaPathways_func_search.py
__author__ = "Kishori M Konwar" __copyright__ = "Copyright 2020, MetaPathways" __version__ = "3.5.0" __maintainer__ = "Kishori M Konwar" __status__ = "Release" try: import sys, re, csv, traceback from os import path, _exit, rename import logging.handlers from optparse import OptionParser, OptionGroup ...
PypiClean