id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/examples/pilot-api/example-pilot-data.py | import sys
import os
import time
import logging
logging.basicConfig(level=logging.DEBUG)
sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
from pilot import PilotComputeService, PilotDataService, ComputeDataService, State
COORDINATION_URL = "redis://localhost:6379"
if __name__ == "__main__":
... | PypiClean |
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/SetBootVdREDFISH.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 eithe... | PypiClean |
/Bubot_AuthService-0.0.8-py3-none-any.whl/BubotObj/OcfDevice/subtype/AuthService/static/ui/js/chunk-ba64f62c.cb2f3043.js | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba64f62c"],{"670e":function(t,e,a){"use strict";var r=a("fa89"),n=a.n(r);n.a},e729:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-card",{staticClass:"pa-4",attrs:{flat:""}},[a("div",{class:"... | PypiClean |
/Assimulo-3.0.tar.gz/Assimulo-3.0/assimulo/examples/radau5dae_vanderpol.py |
# Copyright (C) 2010 Modelon AB
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITH... | PypiClean |
/Mopidy-SevenSegmentDisplay-0.3.1.tar.gz/Mopidy-SevenSegmentDisplay-0.3.1/mopidy_sevensegmentdisplay/max7219.py | class Constants(object):
MAX7219_REG_NOOP = 0x0
MAX7219_REG_DIGIT0 = 0x1
MAX7219_REG_DIGIT1 = 0x2
MAX7219_REG_DIGIT2 = 0x3
MAX7219_REG_DIGIT3 = 0x4
MAX7219_REG_DIGIT4 = 0x5
MAX7219_REG_DIGIT5 = 0x6
MAX7219_REG_DIGIT6 = 0x7
MAX7219_REG_DIGIT7 = 0x8
MAX7219_REG_DECODEMODE = 0x9
... | PypiClean |
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/preprocessor/_time.py | import copy
import datetime
import logging
from typing import Union
from warnings import filterwarnings
import dask.array as da
import iris
import iris.coord_categorisation
import iris.cube
import iris.exceptions
import iris.util
import isodate
import numpy as np
from iris.time import PartialDateTime
from esmvalcore.... | PypiClean |
/AuthKit-0.4.5.tar.gz/AuthKit-0.4.5/authkit/authenticate/cookie.py |
from paste.deploy.converters import asbool
from paste.auth.auth_tkt import *
import md5
import os
import inspect
import types
import time
import logging
from paste.deploy.converters import asbool
from authkit.authenticate import strip_base, swap_underscore
from authkit.authenticate import AuthKitConfigError
from authk... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Control/GetFeature.js | * @requires OpenLayers/Control.js
* @requires OpenLayers/Handler/Click.js
* @requires OpenLayers/Handler/Box.js
* @requires OpenLayers/Handler/Hover.js
* @requires OpenLayers/Filter/Spatial.js
*/
/**
* Class: OpenLayers.Control.GetFeature
* Gets vector features for locations underneath the mouse cursor. Can be... | PypiClean |
/FullMonty-0.1.20.tar.gz/FullMonty-0.1.20/fullmonty/graceful_interrupt_handler.py | import signal
__docformat__ = 'restructuredtext en'
__all__ = ('GracefulInterruptHandler',)
class GracefulInterruptHandler(object):
"""
Example Usage::
with GracefulInterruptHandler() as h1:
while True:
print("(1)...")
time.sleep(1)
with Gr... | PypiClean |
/Aesthete-0.4.2.tar.gz/Aesthete-0.4.2/aesthete/glancer/Scatter.py | import os, math, sys, getopt, string
import pango
import random
from gtk import gdk
from ..tablemaker import PreferencesTableMaker
from aobject.utils import debug_print
import threading
import cairo, gtk, gobject
import matplotlib
import numpy, numpy.fft
import scipy, scipy.interpolate, scipy.optimize
from matplotlib.b... | PypiClean |
/Mastodon.py-1.8.1.tar.gz/Mastodon.py-1.8.1/mastodon/errors.py |
##
# Exceptions
##
class MastodonError(Exception):
"""Base class for Mastodon.py exceptions"""
class MastodonVersionError(MastodonError):
"""Raised when a function is called that the version of Mastodon for which
Mastodon.py was instantiated does not support"""
class MastodonIllegalArgumentError(Val... | PypiClean |
/FrAG-1.1.0.tar.gz/FrAG-1.1.0/frag_pele/AdaptivePELE_repo/AdaptivePELE/freeEnergies/getRepresentativeStructures.py | import argparse
import numpy as np
import os
from AdaptivePELE.utilities import utilities
def parseArgs():
parser = argparse.ArgumentParser(description="Get representative structures "
"by selecting the ones closest to the "
"cluster center... | PypiClean |
/Mopidy_MPD-3.3.0-py3-none-any.whl/mopidy_mpd/protocol/reflection.py | from mopidy_mpd import exceptions, protocol
@protocol.commands.add("config", list_command=False)
def config(context):
"""
*musicpd.org, reflection section:*
``config``
Dumps configuration values that may be interesting for the client. This
command is only permitted to "local" clients... | PypiClean |
/Nightingale_ORM-0.9.23-py3-none-any.whl/NightingaleORM/pgsqlInterpreter.py | from NightingaleORM.fields import Field
def translateSelect(database,
schema,
table,
alias,
shows,
joins,
wheres,
brackets,
orders,
groupB... | PypiClean |
/ClangBear-0.10.0.tar.gz/ClangBear-0.10.0/coalaClangBear/ClangBear.py | from clang.cindex import Index, LibclangError
from coalib.bears.LocalBear import LocalBear
from dependency_management.requirements.PipRequirement import PipRequirement
from coalib.results.Diff import Diff
from coalib.results.Result import Result
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
from coalib.re... | PypiClean |
/EL%20Status-1.0.tar.gz/EL Status-1.0/api/namespace_status.py | from flask import request
from flask_restplus import Resource
from api.status_dto import StatusDTO
from extensions import db
from model.status import Status
from serializer.status_schema import StatusSchema
namespace = StatusDTO.namespace
@namespace.route('/')
class ListStatus(Resource):
@namespace.doc(params=... | PypiClean |
/Intx-0.0.2-py3-none-any.whl/intx/intx.py | class intx:
def __init__(self, arg, base: int = 10):
if isinstance(arg, (int, str, intx, float)):
if base != 10:
self.val = int(str(arg), base)
else:
self.val = int(arg)
self.itercur = 0
elif isinstance(arg, (tuple, list, set)):
... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/HTML-CSS/fonts/STIX-Web/Normal/Italic/Main.js | MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS["STIXMathJax_Normal-italic"]={directory:"Normal/Italic",family:"STIXMathJax_Normal",style:"italic",testString:"\u00A0\u210E\uD835\uDC34\uD835\uDC35\uD835\uDC36\uD835\uDC37\uD835\uDC38\uD835\uDC39\uD835\uDC3A\uD835\uDC3B\uD835\uDC3C\uD835\uDC3D\uD835\uDC3E\uD835\uDC3F\uD835\u... | PypiClean |
/MLStudio-0.1.15.tar.gz/MLStudio-0.1.15/mlstudio/visual/animations.py | """Module for animations."""
from collections import OrderedDict
from copy import copy, deepcopy
import datetime
import itertools
from itertools import zip_longest
import math
import os
from pathlib import Path
import sys
from IPython.display import HTML
import matplotlib as mpl
import matplotlib.pyplot as plt
plt... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/ffc/fiatinterface.py |
# Copyright (C) 2009-2016 Kristian B. Oelgaard and Anders Logg
#
# This file is part of FFC.
#
# FFC is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your optio... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gauges/GlossyHorizontalGauge.js.uncompressed.js | define("dojox/gauges/GlossyHorizontalGauge", ["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/Color","dojox/gfx","./BarGauge","./BarCircleIndicator","./GlossyHorizontalGaugeMarker"],
function(declare, connect, lang, Color, gfx, BarGauge, BarCircleIndicator, GlossyHorizontalGaugeMarker) {
var... | PypiClean |
/JsQt-0.5.0.tar.gz/JsQt-0.5.0/src/jsqt/il/qt/itemview.py |
import re
from base import SimpleProp
from gui import WidgetBase
from jsqt import il
from obj import Base
class EnumSelectionMode(il.primitive.Enum):
value_map = {
"QAbstractItemView::SingleSelection": il.primitive.String("single"),
"QAbstractItemView::ExtendedSelection": il.primitive.String("ad... | PypiClean |
/CPAT-3.0.4.tar.gz/CPAT-3.0.4/docs_v3/_build/html/_static/underscore-1.3.1.js |
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the server.
var root = this;
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
// Establish the object that gets returned to break out of a loop itera... | PypiClean |
/KL_Audit_supportV1.8-1.0-py3-none-any.whl/AuditModule/core/applications/AuditManagementModules.py | from AuditModule.common import AppConstants
from AuditModule.util import Logging as LOGG
import traceback
import json
from AuditModule.core.applications import AuditUserManagementStrategies
Logger = LOGG.get_logger()
def audit_logs_modules(application_type, content_type, application_data):
try:
user_name... | PypiClean |
/KnowledgeCore-2.8.10.tar.gz/KnowledgeCore-2.8.10/src/knowledge_core/api/__init__.py |
import rospy
from knowledge_core.srv import Manage, ManageRequest
from knowledge_core.srv import Revise, ReviseRequest
from knowledge_core.srv import Query
from knowledge_core.srv import About
from knowledge_core.srv import Lookup
from knowledge_core.srv import Sparql
from knowledge_core.srv import Event
from std_msgs... | PypiClean |
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/RevitViewReferencing.py |
import clr
import System
from System.Collections.Generic import List
clr.ImportExtensions(System.Linq)
import RevitCommonAPI as com
import RevitFamilyUtils as rFamU
import RevitViews as rView
# import Autodesk
import Autodesk.Revit.DB as rdb
# ------------------------ deprecated -----------------------
# the follow... | PypiClean |
/Finance-Jindowin-1.3.3.tar.gz/Finance-Jindowin-1.3.3/jdw/mfc/deckard/goslin.py | import datetime
from pymongo import InsertOne, DeleteOne
from jdw.kdutils.data.mongodb import MongoDBManager
class Goslin(object):
def __init__(self, uri, name='goslin'):
self.name = name
self._mongo_client = MongoDBManager(uri="mongodb://" + uri)
self._codes_pools = [
'RB', '... | PypiClean |
/Extendable_JSON-0.0.1-py3-none-any.whl/extendable_json/exception_serialization.py | import traceback as tb
import sys
import extendable_json.extendable_json as json
from extendable_json import json_serialize, json_deserialize
from extendable_json import version
@json_serialize.register(Exception)
def json_exception(e):
t, v, tb = sys.exc_info()
return json_serialize_exception(type_=t, value=... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/iron-input/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/iron-input/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page turn... | PypiClean |
/Django-Youtuber-0.1.1.tar.gz/Django-Youtuber-0.1.1/README.md | Django Youtuber
===============
A tiny app that goes through the list of channels/playlists from youtube.
This app enables you to add as many entries as you need through the admin panel and it will scrape the video data you
need from youtube.
How to use
----------
Simply add the following configuration values to you... | PypiClean |
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/isom/python/IsomUserMgmt_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_in... | PypiClean |
/Mantissa-0.9.0.tar.gz/Mantissa-0.9.0/xmantissa/stats.py | from zope.interface import implements
from twisted.application import service
from twisted.protocols import policies
from twisted.python import log
from twisted.protocols.amp import AMP, Command, AmpList, Unicode
from axiom import iaxiom, item, attributes, upgrade
from xmantissa.ixmantissa import IBoxReceiverFactory... | PypiClean |
/Flask-LwAdmin-0.6.3.tar.gz/Flask-LwAdmin-0.6.3/flask_lwadmin/pager.py | from math import floor, ceil
from flask_lwadmin.config import ConfigParser
class Pager(ConfigParser):
def __init__(self, max_per_page=10, page=1):
ConfigParser.__init__(self)
self.page = int(page)
self.max_per_page = int(max_per_page)
self.last_page = 1
self.nb_results = 0... | PypiClean |
/Fedora3.8_Utilities-1.2.0.tar.gz/Fedora3.8_Utilities-1.2.0/legacy_fedora/mapping.py | __author__ = "Jeremy Nelson"
MAP = {"mappings": {
"mods": {
"properties": {
"abstract": {
"type": "text"
},
"adminNote": {
"type": "text"
},
"content_models": {
"index": "false",
... | PypiClean |
/CherryMusic-0.41.3.tar.gz/CherryMusic-0.41.3/cherrymusicserver/sqlitecache.py |
#python 2.6+ backward compability
from __future__ import unicode_literals
import os
import re
import sqlite3
import sys
import traceback
from backport.collections import deque, Counter
from contextlib import closing
from operator import itemgetter
import cherrymusicserver as cherry
from cherrymusicserver import dat... | PypiClean |
/BBOBtorch-1.0.1.tar.gz/BBOBtorch-1.0.1/bbobtorch/utils.py | import torch as t
PI = 3.15159265
def T_osz(x) -> t.Tensor:
x_hat = t.log(t.abs(x))
x_hat[t.isneginf(x_hat)] = 0
c1 = t.full_like(x, 5.5)
c1[x > 0] = 10.0
c2 = t.full_like(x, 3.1)
c2[x > 0] = 7.9
return t.sign(x)*t.exp(x_hat + 0.049 * (t.sin(c1 * x_hat + t.sin(c2 * x_hat))))
def T_asy(x,... | PypiClean |
/DBRetina-2.2.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/kSpider2/ks_filter.py | from __future__ import division
import sys
import _kSpider_internal as kSpider_internal
import click
from kSpider2.click_context import cli
import subprocess
import os
import kSpider2.dbretina_doc_url as dbretina_doc
def is_awk_available():
try:
subprocess.run(["awk"], stdin=subprocess.DEVNULL,
... | PypiClean |
/Nitrous-0.9.3-py3-none-any.whl/turbogears/command/i18n.py |
"""Command-line user interface for i18n administration."""
from __future__ import print_function
from builtins import str
from past.builtins import basestring
from builtins import object
import re
import glob
import os
import atexit
import optparse
import tempfile
from pkg_resources import resource_filename
import f... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/cmorizers/data/formatters/datasets/cds_satellite_albedo.py | r"""ESMValTool CMORizer for cds-satellite-albedo data.
Tier
Tier 3
Source
https://cds.climate.copernicus.eu/
cdsapp#!/dataset/satellite-albedo?tab=form
Last access
20190401
Download and processing instructions
- Download the data from source to the right directory
using the download script
... | PypiClean |
/NEU-ipgw-manager-3.0rc0.tar.gz/NEU-ipgw-manager-3.0rc0/ipgw/core/config.py | import json
from os import getenv
from pathlib import Path
from typing import TypedDict, List, Any, Union
from .errors_modals import *
class User(TypedDict, total=False):
username: str
password: str
is_default: bool
last_login_time: str
consumed_bytes: int
last_login_result: str
class Conf... | PypiClean |
/OT_PyLD-2.1.1-py3-none-any.whl/pyld/context_resolver.py | from frozendict import frozendict
from c14n.Canonicalize import canonicalize
from pyld import jsonld
from .resolved_context import ResolvedContext
MAX_CONTEXT_URLS = 10
class ContextResolver:
"""
Resolves and caches remote contexts.
"""
def __init__(self, shared_cache, document_loader):
"""
... | PypiClean |
/luhn_algorithm_validator-1.0.2.tar.gz/luhn_algorithm_validator-1.0.1/luhn.py |
# Python 3.4 Implementation of the Luhn Algorithm
# Checks to see if 14, 15 or 16 digit account number is Luhn Compliant.
# See https://en.wikipedia.org/wiki/Luhn_algorithm for formula details.
# This file is suitable for unittest testing
# CardNumber is an account number (for example) received as a string
# Code ... | PypiClean |
/DLMS_SPODES-0.40.11.tar.gz/DLMS_SPODES-0.40.11/src/DLMS_SPODES/pdu_enums.py | from enum import IntEnum, IntFlag
from typing import TypeAlias
class DataAccessResult(IntEnum):
SUCCESS = 0
HARDWARE_FAULT = 1
TEMPORARY_FAILURE = 2
READ_WRITE_DENIED = 3
OBJECT_UNDEFINED = 4
OBJECT_CLASS_INCONSISTENT = 9
OBJECT_UNAVAILABLE = 11
TYPE_UNMATCHED = 12
SCOPE_OF_ACCESS_... | PypiClean |
/httxlib-1.0.4.zip/httxlib-1.0.4/httxlib/httxoptions.py | from copy import deepcopy
from httxauthcache import HttxAuthCache
from httxcertificates import HttxCertKeyManager, HttxCertReqManager, HttxCACertManager
from httxcookiejar import HttxCookieJar
from httxcompressionset import HttxCompressionSet
from httxobject import HttxObject
from httxpassmanager import HttxPassManage... | PypiClean |
/LindexURI-0.1.2.tar.gz/LindexURI-0.1.2/README.md | # LindexURI
BigData URI utility
The idea is that every information stored is addressable using a URI, in this case we like to work with HDFS and HIVE. There
LindexURI.isValid( uri ) : returns true if the URI is valid, it's a static method and can be used in a quick way.
### luri = LindexURI(uri)
### luri.isPartitio... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/app.js | This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, please visit:
http://dojotoolkit.org
*/
//>>built
require({cache:{"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./ready","./_base/sniff","./_base/window"],function(_1,_2,_3,_4,_... | PypiClean |
/LZBEAT-0.13.1.tar.gz/LZBEAT-0.13.1/econml/_shap.py | import shap
from collections import defaultdict
import numpy as np
from .utilities import broadcast_unit_treatments, cross_product, get_feature_names_or_default
def _shap_explain_cme(cme_model, X, d_t, d_y,
feature_names=None, treatment_names=None, output_names=None,
input_... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojo/cldr/nls/ar/gregorian.js | ({"dateFormatItem-yM":"M/yyyy","field-dayperiod":"ص/م","dateFormatItem-yQ":"yyyy Q","field-minute":"الدقائق","eraNames":["قبل الميلاد","ميلادي"],"dateFormatItem-MMMEd":"E d MMM","field-weekday":"اليوم","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-MMdd":"dd/MM","days-standAlone-wide":["الأحد","الإثنين","الثلاثاء","ال... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/codeintel2/lib_srcs/node.js/0.6/zlib.js | var zlib = {};
/**
* Returns a new Gzip object with an options.
* @param options
* @returns {zlib.Gzip} a new Gzip object with an options
*/
zlib.createGzip = function(options) {}
/**
* Returns a new Gunzip object with an options.
* @param options
* @returns {zlib.Gunzip} a new Gunzip object with an options
*... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/gis/management/commands/ogrinspect.py | import os
from optparse import make_option
from django.contrib.gis import gdal
from django.core.management.base import LabelCommand, CommandError
def layer_option(option, opt, value, parser):
"""
Callback for `make_option` for the `ogrinspect` `layer_key`
keyword option which may be an integer or a string.... | PypiClean |
/FAdo3-1.0.tar.gz/FAdo3-1.0/FAdo/yappy_parser.py | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from past.builtins import cmp
from future import standard_library
standard_library.install_aliases()
from builtins import input
from builtins import str
from builtins imp... | PypiClean |
/Grevling-2.0.0-py3-none-any.whl/grevling/util.py | import asyncio
from contextlib import contextmanager
from functools import wraps
import inspect
from itertools import product, chain
import json
import logging
from typing import List, Optional
from typing_inspect import get_origin, get_args
import numpy as np
from numpy.polynomial import Legendre
import pandas as p... | PypiClean |
/BioFlow-0.2.3.tar.gz/BioFlow-0.2.3/bioflow/annotation_network/knowledge_access_analysis.py | import pickle
from collections import namedtuple
from csv import reader
from multiprocessing import Pool
import numpy as np
from matplotlib import pyplot as plt
from bioflow.algorithms_bank.conduction_routines import perform_clustering
from bioflow.annotation_network.BioKnowledgeInterface import GeneOntologyInterface... | PypiClean |
/NucDetect-0.18.3-py3-none-any.whl/gui/loader.py | import time
from typing import Callable, Iterable
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QGraphicsView
from core.roi.ROIHandler import ROIHandler
from gui.Util import create_partial_list
class Loader(QTimer):
def __init__(self, items: Iterable, batch_size: int = 25,
batch_... | PypiClean |
/AxisUtilities-19.12.6.36596.tar.gz/AxisUtilities-19.12.6.36596/axisutilities/axisbinding.py | from enum import Enum
from numbers import Number
class AxisBinding(Enum):
"""
This class/Enumeration defines the different way that a data tick could be bound to an interval. The available
options are:
- `Beginning`: This means the data tick is bound to the beginning of the interval or the lower bound... | PypiClean |
/HarmoniaCosmo-0.1.2-py3-none-any.whl/harmonia/algorithms/integration.py | import healpy as hp
import numpy as np
from scipy.integrate import dblquad, quad
def _angular_integrand(phi, theta, func, complex_part):
r"""Evaluate the angular integrand with the Jacobian factor
:math:`\sin\theta`.
Notes
-----
Angular arguments are in reverse order for outward double integratio... | PypiClean |
/Flask-Debug-API-0.1.0.tar.gz/Flask-Debug-API-0.1.0/README.rst | Flask Debug API
===============
Flask-Debug-API is an API Browser for Flask-DebugToolbar.
Injects a form to POST, PUT, PATCH or DELETE to API endpoints and allows debugging SQLAlchemy queries, Werkzeug stack traces, and everything else that Flask-DebugToolbar supports.
Installation
------------
Install with pip
.... | PypiClean |
/Aggrescan3D-1.0.2.tar.gz/Aggrescan3D-1.0.2/aggrescan/__main__.py |
import sys,shutil
import logger
from newRunJob import Job
import optparser as opt
import traceback as _tr
_name = "Main"
def _cleanup(aggrescan_job_instance):
"""
Done to prevent a situation where Job raises an error on initialization and there is nothing to delete
Normally deletes or keeps the simulati... | PypiClean |
/Auto_Python_2014-14.1.5.zip/Auto_Python_2014-14.1.5/component/CPT_driver_cases.py | import common
from common.COM_db_mysql import COM_createdbconnection
from init.init_value import init_value
class Drivergetcase(COM_createdbconnection):
#def __init__(self, username="admin"):
# self.username=username
def cpt_setUsername(self,username="admin"):
self.username=username
def... | PypiClean |
/EMalign-1.0.5.tar.gz/EMalign-1.0.5/src/genRotationsGrid.py | import numpy as np
import math
def q_to_rot(q):
# Convert a quaternion into a rotation matrix.
# Input:
# q: quaternion. May be a vector of dimensions 4 x n
# Output:
# rot_matrix: 3x3xn rotation matrix
# Yariv Aizenbud 31.01.2016
n = np.size(q, a... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/tree/ReformulationTryExceptStatements.py | from nuitka.nodes.BuiltinRefNodes import ExpressionBuiltinExceptionRef
from nuitka.nodes.ComparisonNodes import (
ExpressionComparisonExceptionMatch,
ExpressionComparisonIs,
)
from nuitka.nodes.ConditionalNodes import makeStatementConditional
from nuitka.nodes.ConstantRefNodes import makeConstantRefNode
from nu... | PypiClean |
/JAQK-0.0.3.1.0-py3-none-any.whl/jaqk/database/AMZN/AMZN_balance.py | Statements,12/31/2018,12/31/2017,12/31/2016,12/31/2015
Cash And Cash Equivalents,"31,750,000","20,522,000","19,334,000","15,890,000"
Short Term Investments,"9,500,000","10,464,000","6,647,000","3,918,000"
Net Receivables,"16,259,000","11,835,000","8,339,000","5,654,000"
Inventory,"17,174,000","16,047,000","11,461,000",... | PypiClean |
/HydPy-5.0.1-cp38-cp38-win_amd64.whl/hydpy/models/hland/hland_sequences.py |
# import...
# ...from site-packages
import numpy
# ...from HydPy
from hydpy.core.typingtools import *
from hydpy.core import sequencetools
class Factor1DSequence(sequencetools.FactorSequence):
"""Base class for 1-dimensional factor subclasses that support aggregation with
respect to |ZoneArea|.
All |Fa... | PypiClean |
/LinkPython-0.1.1.tar.gz/LinkPython-0.1.1/modules/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 |
/NEURON-9.0a0-cp311-cp311-macosx_10_15_x86_64.whl/neuron/gui2/plotshape.py | import uuid
import threading
import ctypes
import json
import weakref
import time
import neuron
from neuron import h
_update_thread = None
_gui_widgets = []
_shape_plot_list = []
_active_container = None
_structure_change_count = neuron.nrn_dll_sym("structure_change_cnt", ctypes.c_int)
_diam_change_count = neuron.nrn_... | PypiClean |
/Flask-PyMongo-2.3.0.tar.gz/Flask-PyMongo-2.3.0/flask_pymongo/__init__.py |
__all__ = ("PyMongo", "ASCENDING", "DESCENDING")
from mimetypes import guess_type
import sys
from bson.errors import InvalidId
from bson.objectid import ObjectId
from flask import abort, current_app, request
from gridfs import GridFS, NoFile
from pymongo import uri_parser
from werkzeug.routing import BaseConverter
... | PypiClean |
/Lotse-1.0.0.tar.gz/Lotse-1.0.0/lotse/app/guidance_engine/lotse_engine.py | import logging
import os.path
from typing import List
from rickled import ObjectRickler, Rickle
from guidance_strategies.action import ConditionalGuidanceAction
from guidance_strategies.strategy import Strategy
from guidance_strategies.suggestion import SuggestionModel
from guidance_strategies.meta_strategy import Me... | PypiClean |
/IPFS_Toolkit-0.5.14-py3-none-any.whl/ipfs_peers.py | from threading import Event
import threading
import time
from threading import Thread, Lock
import os
import json
import ipfs_api
from datetime import datetime, timedelta
# default values for various settings, can all be overridden
FORGET_AFTER_HOURS = 200
SUCCESSIVE_REGISTER_IGNORE_DUR_SEC = 60
CONNECTION_ATTEMPT_INT... | PypiClean |
/Flask_No_Cache-1.0-py3-none-any.whl/Flask_No_Cache/utils.py | import re
from collections import Iterable
from six import string_types
from flask import request
RegexObject = type(re.compile(''))
DEFAULT_OPTIONS = dict(resources=[{'pattern': r'/.*', 'action': 'no-store'}])
def parse_resources(resources):
if isinstance(resources, dict):
# To make the API more consis... | PypiClean |
/3ETool-0.8.3.tar.gz/3ETool-0.8.3/EEETools/Tools/GUIElements/connection_and_block_check.py | from EEETools.MainModules.main_module import ArrayHandler
from EEETools.Tools.GUIElements.gui_base_classes import *
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QFont
from PyQt5.QtCore import Qt
import sys
class CheckConnectionWidget(QDialog):
# noinspection PyAr... | PypiClean |
/ArduinoBoardCollection-0.1.1566386412.tar.gz/ArduinoBoardCollection-0.1.1566386412/arduino_board_collection_bu/boards/sensor_boards/thermal/thermistor2/board.py | from ArduinoCodeCreator.arduino_data_types import *
from arduino_board_collection.boards.sensor_boards.basic.analog_read_board2.board import (
AnalogReadBoard2,
)
from arduino_board_collection.boards.sensor_boards.thermal.thermistor.board import (
ThermistorBoard,
)
from arduino_controller.basicboard.board impo... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/box2d/lunarlander/config/lunarlander_gcl_config.py | from easydict import EasyDict
lunarlander_ppo_config = dict(
exp_name='lunarlander_gcl_seed0',
env=dict(
collector_env_num=8,
evaluator_env_num=8,
env_id='LunarLander-v2',
n_evaluator_episode=8,
stop_value=200,
),
reward_model=dict(
learning_rate=0.001,
... | PypiClean |
/BuildSimHubAPI-2.0.0-py3-none-any.whl/buildsimlearn/feature_selection.py | import BuildSimHubAPI as bsh_api
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor
import matplotlib.pyplot as plt
"""
USER INPUT
"""
project_api_key = 'faa5ac84-6f72-427c-a4e7-278e9c17830d'
model_api_key = 'dc06a59c-14ec-4ec0... | PypiClean |
/NlpToolkit-InformationRetrieval-1.0.6.tar.gz/NlpToolkit-InformationRetrieval-1.0.6/InformationRetrieval/Index/TermOccurrence.py | from __future__ import annotations
from Dictionary.Word import Word
class TermOccurrence:
__term: Word
__doc_id: int
__position: int
def __init__(self,
term: Word,
docID: int,
position: int):
self.__term = term
self.__doc_id = docID... | PypiClean |
/NucleoATAC-0.3.4.tar.gz/NucleoATAC-0.3.4/pyatac/signal_around_sites.py | import os
import numpy as np
#import matplotlib as mpl
#mpl.use('Agg')
import matplotlib.pyplot as plt
from multiprocessing import Pool
import itertools
import traceback
#Import needed functions/classes from pyatac
from pyatac.bedgraph import BedGraphFile
from pyatac.chunk import ChunkList
from pyatac.utils import rea... | PypiClean |
/NJU_jiaowu_helper-0.3.1.tar.gz/NJU_jiaowu_helper-0.3.1/jiaowu/console/instruction.py | import re
from jiaowu.core.model.task_model import Task
from jiaowu.data.constants.tasks_reflection import TASK_LIST, PARAM_LIST
class Instruction:
header = None
function_abbr = None
ins_str = None
params = {}
def __init__(self, ins_str):
self.ins_str = ins_str
self.__analyze_head... | PypiClean |
/NICEx-0.2.3.tar.gz/NICEx-0.2.3/nice/utils/data.py | from dataclasses import dataclass
from abc import ABC
import numpy as np
from nice.utils.distance import *
from scipy.stats import mode
class data_NICE:
def __init__(self,X_train,y_train,cat_feat,num_feat,predict_fn,justified_cf,eps):
self.X_train = X_train
self.y_train = y_train
self.cat_... | PypiClean |
/Dts-OpenFisca-Core-34.8.0.tar.gz/Dts-OpenFisca-Core-34.8.0/openfisca_core/indexed_enums.py | from __future__ import annotations
from enum import Enum as BaseEnum
from typing import Any, NoReturn, Optional, Type, Union
from numpy import (
asarray,
int16,
logical_not as not_,
ndarray,
select,
)
ENUM_ARRAY_DTYPE = int16
class Enum(BaseEnum):
"""
Enum based on `enum34 <https://... | PypiClean |
/APAV-1.4.0-cp311-cp311-win_amd64.whl/apav/core/histogram.py | from typing import Sequence, Tuple, List, Dict, Any, Union, Type, Optional, TYPE_CHECKING
from numbers import Real, Number
from numpy import ndarray
import fast_histogram as fh
import numpy as n
from apav.utils import validate
def centers2edges(data: ndarray, bin_width: Real) -> ndarray:
"""
Convert the x v... | PypiClean |
/NASGrpcFileSystem2-1.3.8.tar.gz/NASGrpcFileSystem2-1.3.8/NASGrpcFileSystem/grpc_file_handle.py | import logging
import grpc
from .proto.files_pb2_grpc import FileWorkerStub
from .grpc_create_file import create_file
from .grpc_describe_file import describe_file
from .grpc_modify_file import modify_file
from .grpc_copy_move_file import copy_file, move_file
try:
from urllib.parse import urlparse
except BaseExce... | PypiClean |
/ContrailOnlineCAClient-0.5.1-py3-none-any.whl/contrail/security/onlineca/client/sh/onlineca-get-cert-wget.sh | cmdname=$(basename $0)
cmdline_opt=`getopt hU:l:So:c: $*`
usage="Usage: $cmdname [-U Short-Lived Credential Service URI][-l username] ...\n
\n
Options\n
-h\t\t\tDisplays usage\n
-U <uri>\t\tShort-Lived Credential service URI\n
-l <username>\t\tUsername for the delegated proxy (defaults to \$LOG... | PypiClean |
/CellDetection-0.4.3-py3-none-any.whl/celldetection/mpi/mpi.py | import numpy as np
_ERR = None
try:
from mpi4py import MPI
ANY_TAG = MPI.ANY_TAG
ANY_SOURCE = MPI.ANY_SOURCE
except (ModuleNotFoundError, ImportError) as e:
_ERR = e
MPI = False
ANY_TAG = -1
ANY_SOURCE = -2 # may differ depending on MPI implementation
__all__ = ['recv', 'send', 'sink', '... | PypiClean |
/CUriTools-0.7.1.tar.gz/CUriTools-0.7.1/curitools/setup_problems.py | import re
import sys
import os
from shutil import copy
class SetupProblem(object):
def __init__(self, problem, workdir, dir_template, language):
self.problem = problem
self.workdir = workdir
self.dir_template = dir_template
self.language = language
self.list_files = { ... | PypiClean |
/Assimulo-3.0.tar.gz/Assimulo-3.0/assimulo/examples/radau5ode_vanderpol.py |
# Copyright (C) 2010 Modelon AB
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITH... | PypiClean |
/Music-Player-1.0.5.1.tar.gz/Music-Player-1.0.5.1/MusicPlayer/dbManager/userInfoManager.py | import os
import os.path
from dbManager import DbManager
home = os.path.expanduser('~')
if '.musicplayer' not in os.listdir(home):
os.mkdir(os.path.join(home, '.musicplayer'))
dbPath = os.path.join(home, '.musicplayer', 'userData.db')
createTableString = """
CREATE TABLE IF NOT EXISTS playhistory(
id INTEG... | PypiClean |
/Flask-Administration-0.1.42.tar.gz/Flask-Administration-0.1.42/flask_administration/static/js/library/underscore.string.js | (function(k){var o=String.prototype.trim,l=function(a,b){for(var f=[];0<b;f[--b]=a);return f.join("")},c=function(a){return function(){for(var b=Array.prototype.slice.call(arguments),f=0;f<b.length;f++)b[f]=null==b[f]?"":""+b[f];return a.apply(null,b)}},m=function(){function a(a){return Object.prototype.toString.call(a... | PypiClean |
/OTLModel/Classes/Onderdeel/Damwand.py | from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.Abstracten.ConstructieElement import ConstructieElement
from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField
from OTLMOW.OTLModel.Datatypes.KlDamwandMateriaal import KlDamwandMateriaal
from OTLMOW.OTLModel.Datatype... | PypiClean |
/Auxjad-1.0.0.tar.gz/Auxjad-1.0.0/auxjad/score/_HarmonicParent.py | from typing import Union
import abjad
class _HarmonicParent:
r"""This is the parent class of :class:`auxjad.ArtificialHarmonic` and
:class:`auxjad.HarmonicNote`. It implements two common properties with
``@property`` and ``@setter`` decorators.
"""
### CLASS VARIABLES ###
# due to subclasse... | PypiClean |
/Bubot_AdminPanel-0.0.2-py3-none-any.whl/BubotObj/OcfDevice/subtype/AdminPanel/static/ui/js/chunk-ce165a3e.b8a4ba9e.js | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ce165a3e"],{"6ece":function(e,t,r){},"8b32":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-container",{staticClass:"pa-0 ma-0"},[r("v-progress-linear",{attrs:{indeterminate:e.loading,height:... | PypiClean |
/CityTime-1.0.0.tar.gz/CityTime-1.0.0/README.rst | CityTime
########
.. image:: https://img.shields.io/codecov/c/github/tweyter/CityTime.svg
:target: https://codecov.io/gh/tweyter/CityTime
.. image:: https://travis-ci.org/tweyter/CityTime.svg
:alt: CityTime Build status
:target: https://travis-ci.org/tweyter/CityTime
Thanks:
/u/phira
The CityTime object... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/batch_workflow_child_py3.py |
from msrest.serialization import Model
class BatchWorkflowChild(Model):
"""Batch workflow settings.
All required parameters must be populated in order to send to Azure.
:param due_date: Required.
:type due_date: ~energycap.sdk.models.BillHeaderWorkflowChild
:param statement_date: Required.
... | PypiClean |
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/ed_pages.py | __author__ = "Cody Precord <cprecord@editra.org>"
__svnid__ = "$Id: ed_pages.py 72278 2012-08-02 14:24:23Z CJP $"
__revision__ = "$Revision: 72278 $"
#--------------------------------------------------------------------------#
# Dependencies
import os
import sys
import glob
import wx
# Editra Libraries
import ed_glob... | PypiClean |
/ContrailOnlineCAClient-0.5.1-py3-none-any.whl/contrail/security/onlineca/client/sh/onlineca-get-trustroots-wget.sh | cmdname=$(basename $0)
cmdline_opt=`getopt hU:bc: $*`
usage="Usage: $cmdname [-h][-U get trust roots URI][-b][-c CA directory]\n
\n
Options\n
-h\t\t\tDisplays usage and quits.\n
-U <uri>\t\tShort-Lived Credential service URI\n
-b\t\t\tbootstrap trust in the Short-Lived Credential Service\n
... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/acorn-walk/dist/walk.d.ts | import {Node} from 'acorn';
declare module "acorn-walk" {
type FullWalkerCallback<TState> = (
node: Node,
state: TState,
type: string
) => void;
type FullAncestorWalkerCallback<TState> = (
node: Node,
state: TState | Node[],
ancestors: Node[],
type: string
) => void;
type WalkerC... | PypiClean |
/CheckMyTex-0.10.5.tar.gz/CheckMyTex-0.10.5/checkmytex/filtering/authors.py | import os
import re
import typing
from yalafi.tex2txt import Options, tex2txt
from ..finding import Problem
from ..latex_document import LatexDocument
from .filter import Filter
class IgnoreLikelyAuthorNames(Filter):
"""
Finds author names use before \\cite and prevents them to be detected
as spelling e... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/admin/static/admin/js/getElementsBySelector.js | function getAllChildren(e) {
// Returns all children of element. Workaround required for IE5/Windows. Ugh.
return e.all ? e.all : e.getElementsByTagName('*');
}
document.getElementsBySelector = function(selector) {
// Attempt to fail gracefully in lesser browsers
if (!document.getElementsByTagName) {
retur... | PypiClean |
/LambdaTool-0.9.5.tar.gz/LambdaTool-0.9.5/lambdatool/template_creator.py | from mako.template import Template
from mako.runtime import Context
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from lambdatool.parts import get_the_api_chunk
from lambdatool.cf_import_things import role_parameter_section
from lambdatool.cf_import_things import parameter_ro... | PypiClean |
/Graphy-1.0.0.tar.gz/Graphy-1.0.0/graphy/formatters.py | def AutoLegend(chart):
"""Automatically fill out the legend based on series labels. This will only
fill out the legend if is at least one series with a label.
"""
chart._show_legend = False
labels = []
for series in chart.data:
if series.label is None:
labels.append('')
else:
labels.app... | PypiClean |
/Ngoto-0.0.39-py3-none-any.whl/ngoto/core/util/rich/progress_bar.py | import math
from functools import lru_cache
from time import monotonic
from typing import Iterable, List, Optional
from .color import Color, blend_rgb
from .color_triplet import ColorTriplet
from .console import Console, ConsoleOptions, RenderResult
from .jupyter import JupyterMixin
from .measure import Measurement
fr... | PypiClean |
/GreParl-0.3.tar.gz/GreParl-0.3/greparl/SearchEngine/preprocessing/create_group.py | import io
from typing import Callable
from ..backend.speech import Speech
from ..backend.speech_file import SpeechFile
from collections import defaultdict
import os
def party(speech: Speech):
"""
Get the speaker name
:param speech:
:return:
"""
return speech.political_party
def speaker_name(... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.