id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/attr/validators.py | from __future__ import absolute_import, division, print_function
from ._make import _AndValidator, and_, attrib, attrs
__all__ = ["and_", "in_", "instance_of", "optional", "provides"]
@attrs(repr=False, slots=True, hash=True)
class _InstanceOfValidator(object):
type = attrib()
def __call__(self, inst, att... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/extensions/TeX/text-macros.js | MathJax.Extension["TeX/text-macros"]={version:"2.7.9"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var c=d.Definitions;d.Parse.Augment({InternalMath:function(f,g){var e=b(f,{}).Parse();if(g!=null){e=[a.mstyle.apply(a,e).With({displaystyle:false,scr... | PypiClean |
/GloboNetworkAPI-0.9.6.tar.gz/GloboNetworkAPI-0.9.6/networkapiclient/DireitoGrupoEquipamento.py |
from networkapiclient.GenericClient import GenericClient
from networkapiclient.utils import get_list_map, is_valid_int_param
from networkapiclient.exception import InvalidParameterError
class DireitoGrupoEquipamento(GenericClient):
def __init__(self, networkapi_url, user, password, user_ldap=None):
"""C... | PypiClean |
/CheesePrism-0.4.0a1.tar.gz/CheesePrism-0.4.0a1/doc/DESIGN.rst | =============
CheesePrism
=============
A python simple index implementation with maintained by a pyramid
webapp.
Basic Design
============
All serving of packages, metadata and index html is handled by a
separate commodity server: nginx, apache, etc. The webapp provides
interfaces for getting new packages into t... | PypiClean |
/ALPAFA-0.2.tar.gz/ALPAFA-0.2/alpafa/cli.py |
import argparse
from .alpafa import Lexicon
from .parse import parse_file, ParserError
def set_args():
'''Sets command line parameters, and runs ALPAFA.'''
parser = argparse.ArgumentParser(prog='alpafa',
description='Applies the algorithm from AAFP to a correctly \
... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/typescript/README.md |
# TypeScript
[](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI)
[](https://dev.azure.com/typescript/TypeScrip... | PypiClean |
/FINE-2.2.2.tar.gz/FINE-2.2.2/docs/source/mathematicalBackgroundDoc.rst | *************************
Mathematical Descriptions
*************************
The underlying mathematical structure of FINE leads to big linear optimization problems
.. math::
& \min{c^Tx} \\
s.t. \> & Ax=b \\
& Cx \leq d
mixed-integer linear optimization problems
.. math::
& \min{c^Tx} \\
s.t. \> & ... | PypiClean |
/AMDirT-1.4.3.tar.gz/AMDirT-1.4.3/README.md | [](https://doi.org/10.5281/zenodo.4003825) [](https://pypi.org/project/AMDirT) [](https://amdirt.readthedocs.io/en/dev/?ba... | PypiClean |
/MOAI-2.0.0.tar.gz/MOAI-2.0.0/README.txt |
Installing MOAI
===============
The MOAI Software can be run in any wsgi compliant server.
MOAI comes with a development server that can be used for testing. In production mod_wsgi can be used to run Moai in the apache webserver.
Installation Steps
==================
MOAI is a normal python package. It is tested ... | PypiClean |
/CephQeSdk-1.0.0.tar.gz/CephQeSdk-1.0.0/src/RhcsQeSdk/core/cli/ceph/blocklist.py | import logging
import RhcsQeSdk.core.cli.fabfile as fabfile
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"%(asctime)s - %(levelname)s - %(name)s:%(lineno)d - %(message)s"
)
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(formatter)
strea... | PypiClean |
/FunID-0.3.16.2.tar.gz/FunID-0.3.16.2/funid/external/trimal.v1.4/trimAl/scripts/get_sequence_representative_from_alignment.py |
#
# 'get_sequence_representative_from_alignment.py'
#
# Script implemented to work with trimAl to analyze gaps statistics and decide
# which are the boundaries in a given alignment - columns inbetween these
# boundaries will not be removed independently of the trimming strategy
# selected.
#
# [2014] S. Cape... | PypiClean |
/HavNegpy-1.2.tar.gz/HavNegpy-1.2/docs/_build/doctrees/nbsphinx/_build/html/_build/html/_build/doctrees/nbsphinx/_build/doctrees/nbsphinx/_build/html/hn_module_tutorial.ipynb | # Tutorial for the HN module of HavNegpy package
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import HavNegpy as dd
%matplotlib qt
os.chdir(r'M:\Marshall_Data\mohamed_data\mohamed_data\n44')
def create_dataframe(f):
col_names = ['Freq', 'T', 'Eps1', 'Eps2']
#f ... | PypiClean |
/Arpeggio-2.0.2.tar.gz/Arpeggio-2.0.2/docs/parse_trees.md | # Parse trees
Parse tree is a first structure you get from a successful parse.
---
Parse tree or concrete syntax tree is a tree structure built from the input
string during parsing. It represent the structure of the input string. Each
node in the parse tree is either a [terminal](#terminal-nodes) or
[non-terminal](... | PypiClean |
/Gpxity-1.7.2-py3-none-any.whl/gpxity/backend.py |
# Copyright (c) 2019 Wolfgang Rohdewald <wolfgang@rohdewald.de>
# See LICENSE for details.
"""This module defines :class:`~gpxity.backend.Backend`."""
# pylint: disable=protected-access
import datetime
from inspect import getmembers, isfunction
from contextlib import contextmanager
import logging
from copy import d... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/lib/utils/file_proxy.py |
import os
import time
from cloudferry import cfglib
from cloudferry.lib.utils import log
from cloudferry.lib.utils import sizeof_format
LOG = log.getLogger(__name__)
CONF = cfglib.CONF
def get_file_size(file_obj):
"""
Analyze file-like object and attempt to determine its size.
:param file_obj: file-li... | PypiClean |
/energon_prometheus_exporter_test-0.0.1-py3-none-any.whl/torchdistill-test/torchdistill/losses/util.py | FUNC2EXTRACT_ORG_OUTPUT_DICT = dict()
def register_func2extract_org_output(func):
FUNC2EXTRACT_ORG_OUTPUT_DICT[func.__name__] = func
return func
@register_func2extract_org_output
def extract_simple_org_loss(org_criterion, student_outputs, teacher_outputs, targets, uses_teacher_output, **kwargs):
org_los... | PypiClean |
/Eve_ml-0.0.1-py3-none-any.whl/eve/rl/utils/utils.py | import argparse
import glob
import importlib
import os
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import gym
import stable_baselines3 as sb3 # noqa: F401
import torch as th # noqa: F401
import yaml
from stable_baselines3 import A2C, DDPG, DQN, HER, PPO, SAC, TD3
from stable_baselines3.commo... | PypiClean |
/CompassAI-0.0.3.tar.gz/CompassAI-0.0.3/.ipynb_checkpoints/image_classification-checkpoint.ipynb | ```
import numpy as np
from tensorflow import keras
from tensorflow.keras import layers
# Model / data parameters
num_classes = 10
input_shape = (28, 28, 1)
# the data, split between train and test sets
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
# Scale images to the [0, 1] range
x_train... | PypiClean |
/OctoBot-Tentacles-Manager-2.9.4.tar.gz/OctoBot-Tentacles-Manager-2.9.4/octobot_tentacles_manager/util/file_util.py | import aiofiles
import os
import os.path as path
import shutil
import octobot_tentacles_manager.constants as constants
async def find_or_create(path_to_create, is_directory=True, file_content=""):
if not path.exists(path_to_create):
if is_directory:
if not path.isdir(path_to_create):
... | PypiClean |
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/docs/sphx/indexing.rst | Indexing
========
Once your diffraction spots have been found and converted to g-vectors (scattering vectors) you can attempt to find the orientations of the grains in the sample. ImageD11 only includes rudimentary facilities for indexing suitable for relatively small numbers of grains in the sample (probably <100, alt... | PypiClean |
/BeewiPy-0.0.1.tar.gz/BeewiPy-0.0.1/README.md | # BeewiPy
A python library to interact with Beewi SmartBulb.
SmartBulb is a series of Smart LED color bulbs manufactured by Beewi. These bulbs are controlled using BTLE (Bluetooth Low Energy) and the vendor provides an Android app to interact with the bulbs.
This library has been tested with BeeWi BBL229.
**This is ... | PypiClean |
/Ciw-3.0.0.tar.gz/Ciw-3.0.0/docs/Tutorial-I/tutorial_iv.rst | .. _tutorial-iv:
========================================
Tutorial IV: Trials, Warm-up & Cool-down
========================================
In Tutorials I-III we investigated one run of a simulation of a bank.
Before we draw any conclusions about the behaviour of the bank, there are three things we should consider:
... | PypiClean |
/Dero-0.15.0-py3-none-any.whl/dero/reg/summarize/yesno.py | import pandas as pd
from typing import List, Dict
ColBoolDict = Dict[str, List[bool]]
def col_boolean_dict_from_list_of_lists_of_columns(column_list_list: List[List[str]]) -> ColBoolDict:
"""
transforms [
['a', 'b'],
['a'],
['b'],
None,
False,
[],
['a',... | PypiClean |
/GraphState-1.0.6.tar.gz/GraphState-1.0.6/README.txt | 1. To install in userspace run:
$ python setup.py install --user
or to setup in global space
$ sudo setup.py install
2. Run tests:
$ cd nickel; python nickel_test.py; cd ..
$ cd graph_state; python graph_state_test.py; cd ..
You must see "OK" after test execution
3. Run simple example from python CLI interface:
... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/wladmin/migrations/0001_squashed_0008_auto_20191011_0816.py |
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
import weblate.utils.backup
class Migration(migrations.Migration):
replaces = [
("wladmin", "0001_squashed_0003_auto_20180215_1127"),
("wladmin", "0002_auto_20181127_2116"),
("wladmin"... | PypiClean |
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20/lib/aloha/repository.js | define(
[ 'aloha/core', 'util/class', 'aloha/repositorymanager' ],
function( Aloha, Class, RepositoryManager ) {
// var
// $ = jQuery,
// GENTICS = window.GENTICS,
// Aloha = window.Aloha,
// Class = window.Class;
/**
* Abstract Repository Class. Implement that class for your own repository.
* @namespace Alo... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/lib/os/storage/plugins/nfs/generic.py |
from cloudferry.lib.base import exception
from cloudferry.lib.os.storage.plugins import base
from cloudferry.lib.os.storage.plugins import copy_mechanisms
from cloudferry.lib.utils import files
from cloudferry.lib.utils import remote_runner
from cloudferry.lib.utils import log
LOG = log.getLogger(__name__)
def gene... | PypiClean |
/BiolinkMG-0.3.0.tar.gz/BiolinkMG-0.3.0/metamodel/generators/jsonldgen.py | import os
from typing import Union, TextIO, Any, Optional
from urllib.parse import urljoin
from urllib.request import pathname2url
import click
from jsonasobj import as_json, loads
from metamodel.metamodel import SchemaDefinition, ClassDefinitionName, SlotDefinitionName, TypeDefinitionName, \
ElementName, SlotDef... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/types/user_and_chats/chat.py |
from datetime import datetime
from typing import Union, List, Optional, AsyncGenerator, BinaryIO
import fipper
from fipper import raw, enums
from fipper import types
from fipper import utils
from ..object import Object
class Chat(Object):
"""A chat.
Parameters:
id (``int``):
Unique iden... | PypiClean |
/Kato-FlaskAppBuilder-1.1.14.tar.gz/Kato-FlaskAppBuilder-1.1.14/flask_appbuilder/models/filters.py | import logging
import copy
from .._compat import as_unicode
log = logging.getLogger(__name__)
class BaseFilter(object):
"""
Base class for all data filters.
Sub class to implement your own custom filters
"""
column_name = ''
datamodel = None
model = None
name = ''
is_relat... | PypiClean |
/NW%20distributions-0.1.tar.gz/NW distributions-0.1/distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/DMS_APP-0.2.1-py3-none-any.whl/dms_app/resources/violation/add_voilation.py | from flask import request
from flask_restx import Resource, fields, reqparse
from ...db.db_connection import database_access
from ...namespace import api
from ...response_helper import get_response
import logging
import json
from bson import json_util
from bson.objectid import ObjectId
from ..login_register.login impor... | PypiClean |
/Flask-Camp-0.0.25.tar.gz/Flask-Camp-0.0.25/docs/recipes/document-types.md | One common need is to define schema conditionnaly. You need to :
1. define a document type property on all your document
2. apply a schema conditionnaly, based on that property
*base schema* : be sure
```json
{
"properties": {
"data": {
"type": {
"enum": ["outing", "route"]
}
}
}
}
``... | PypiClean |
/MUSE_OS-1.0.2.tar.gz/MUSE_OS-1.0.2/src/muse/constraints.py | from __future__ import annotations
from dataclasses import dataclass
from enum import Enum, auto
from typing import (
Any,
Callable,
List,
Mapping,
MutableMapping,
Optional,
Sequence,
Text,
Tuple,
Union,
cast,
)
import numpy as np
import pandas as pd
import xarray as xr
fro... | PypiClean |
/Chroma-0.2.0.tar.gz/Chroma-0.2.0/HISTORY.rst | History
-------
0.2.0 (2013-02-01)
------------------
(Breaks backwards compatibility)
- CMY, CMYK Support
- Color Blending (Addative and Subtractive Mixing)
- Comparison (eq, ne)
- Remove color coordinate properties (direct modification)
- Major Bug Fixes
- Hex rounding
- Force alpha between 0 and 1
- Other
- H... | PypiClean |
/BlueWhale3_Geo-0.3.0-py3-none-any.whl/orangecontrib/geo/cc_cities.py | import re
from itertools import chain
_CC_NAME_TO_CC_NAME = {
# EU
'Kosovo': ['Kosovo, Republic of'],
'Åland': ['Åland Islands', 'Aland'],
'Bosnia and Herz.': ['Bosnia and Herzegovina'],
'Czechia': ['Czech Rep.', 'Czech Republic'],
'Faeroe Is.': ['Faroe Islands', 'Faeroe Islands'],
'United... | PypiClean |
/6D657461666C6F77-0.0.17.tar.gz/6D657461666C6F77-0.0.17/metaflow/procpoll.py | import platform
import select
class ProcPollEvent(object):
def __init__(self, fd, can_read=False, is_terminated=False):
self.fd = fd
self.can_read = can_read
self.is_terminated = is_terminated
class ProcPoll(object):
def poll(self):
raise NotImplementedError()
def add(sel... | PypiClean |
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/agents/torch_agents/torch_agent.py | import copy
import hashlib
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Dict, Iterable
import torch
from draugr import sprint
from draugr.torch_utilities import (
global_torch_device,
load_latest_model,
save_model_parameters,
)
from draugr.writers import GraphWriterMixin, Moc... | PypiClean |
/NeoCompilerModelLoaders-1.0.1.tar.gz/NeoCompilerModelLoaders-1.0.1/src/neo_loader/helpers/tf_model_helper.py | import tensorflow as tf
from typing import List, Dict
from pathlib import Path
from enum import Enum
from collections import OrderedDict
from .abstract_model_helper import ModelHelper
class TFModelFormat(Enum):
FrozenGraphModel = "frozen_graph_model"
SavedModel = "saved_model"
class TFModelHelper(ModelHelp... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gfx.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:{"dojox/gfx/_base":function(){define("dojox/gfx/_base",["dojo/_base/lang","dojo/_base/html","dojo/_base/Color","dojo/_base/sniff","... | PypiClean |
/Microbe-1.2.tar.gz/Microbe-1.2/microbe/static/js/editor.js | * Editor class
* @param textarea_id : Textarea id to create CodeMirror instance
* @param upload_url : Url used to upload files with DnD
* @param convert_url : Url used to convert Markdown into html
**/
function Editor(textarea_id, upload_url, convert_url) {
var self = this;
// codemirror
self.codemirro... | PypiClean |
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/blog/migrations/0006_auto__add_field_post_audio_embed__add_field_post_video_embed.py | import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Post.audio_embed'
db.add_column(u'blog_post', 'audio_embed',
self.gf('django.db.models.fields.... | PypiClean |
/OctoBot-Services-1.6.2.tar.gz/OctoBot-Services-1.6.2/octobot_services/interfaces/__init__.py |
from octobot_services.interfaces import abstract_interface
from octobot_services.interfaces.abstract_interface import (
AbstractInterface,
)
from octobot_services.interfaces import interface_factory
from octobot_services.interfaces import bots
from octobot_services.interfaces import util
from octobot_services.int... | PypiClean |
/Aestate-1.1.0.tar.gz/Aestate-1.1.0/aestate/work/Modes.py | from enum import IntEnum
class Singleton:
"""
使用单例模式
"""
@staticmethod
def createFactory(cls):
with cls._instance_lock:
if not hasattr(cls, "__instance__"):
cls.__instance__ = cls(cls.modules)
return cls.__instance__
@staticmethod
def createObje... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/data/validators/composite_validator.py | from muntjac.data.validators.abstract_validator import AbstractValidator
from muntjac.data.validator import InvalidValueException
class CompositeValidator(AbstractValidator):
"""The C{CompositeValidator} allows you to chain (compose) many
validators to validate one field. The contained validators may be requi... | PypiClean |
/CDS-1.0.1.tar.gz/CDS-1.0.1/cds/modules/records/providers.py | """Record ID provider."""
from __future__ import absolute_import, print_function
import requests
from flask import current_app
from invenio_pidstore.errors import PersistentIdentifierError
from invenio_pidstore.models import PIDStatus, RecordIdentifier
from invenio_pidstore.providers.base import BaseProvider
class ... | PypiClean |
/GraphLab_Create-2.1-cp27-none-macosx_10_5_x86_64.macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl/graphlab/data_structures/gframe.py | from .sframe import SFrame
from ..cython.context import debug_trace as cython_context
from ..util import _is_non_string_iterable
from .sarray import SArray, _create_sequential_sarray
import copy
VERTEX_GFRAME = 0
EDGE_GFRAME = 1
class GFrame(SFrame):
"""
GFrame is similar to SFrame but is associated with an ... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/data/utils/pythoneditor/vim.py | import sys
from PyQt5.QtCore import Qt, pyqtSignal, QObject
from PyQt5.QtWidgets import QTextEdit
from PyQt5.QtGui import QColor, QTextCursor
# pylint: disable=protected-access
# pylint: disable=unused-argument
# pylint: disable=too-many-lines
# pylint: disable=too-many-branches
# This magic code sets variables like... | PypiClean |
/CocoPy-1.1.0rc.zip/CocoPy-1.1.0rc/testSuite/TestAlts_Scanner.py | import sys
class Token( object ):
def __init__( self ):
self.kind = 0 # token kind
self.pos = 0 # token position in the source text (starting at 0)
self.col = 0 # token column (starting at 0)
self.line = 0 # token line (starting at 1)
self.val = u'' # tok... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/solvers/pysparse/linearLUSolver.py | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from builtins import range
__docformat__ = 'restructuredtext'
from pysparse.direct import superlu
from fipy.solvers.pysparse.pysparseSolver import PysparseSolver
from fipy.tools import numerix
__all__ = ["Li... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/plugins/specialchar/dialogs/lang/en-gb.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("specialchar","en-gb",{euro:"Euro sign",lsquo:"Left single quotation mark",rsquo:"Right single quotation mark",ldquo:"Left double... | PypiClean |
/OPCDataTransfer-1.1.1.tar.gz/OPCDataTransfer-1.1.1/README.md | # OPC Data Transfer
[](https://pypi.python.org/pypi/PyGithub)

[](https://en.wikipedia.org/wiki/MIT_License)
[ETL (extract-t... | PypiClean |
/Flask-Restless-1.0.0b1.tar.gz/Flask-Restless-1.0.0b1/README |
## Introduction ##
This is Flask-Restless, a [Flask][1] extension that creates URL endpoints that
satisfy the requirements of the [JSON API][2] specification. It is compatible
with models that have been defined using either [SQLAlchemy][3] or
[Flask-SQLAlchemy][4].
This document contains some brief instructions conc... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/contenttypes/admin.py | from functools import partial
from django.contrib.admin.checks import InlineModelAdminChecks
from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.forms import (
BaseGenericInlineFormSet,
ge... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/optimize/constraints.py |
from enum import IntEnum
from math import inf
from typing import Dict
from typing import Iterable
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
import numpy as np
import pandas as pd
from deprecated import deprecated
def require(cond: bool, exception=Assertion... | PypiClean |
/FlaskFarm-4.0.104-py3-none-any.whl/flaskfarm/lib/framework/log_viewer.py | import os
import threading
import time
import traceback
from flask import request
from framework import F
from support import SingletonClass
namespace = 'log'
@F.socketio.on('connect', namespace='/%s' % namespace)
def socket_connect():
F.logger.debug('log connect')
@F.socketio.on('start', namespace='/%s' % na... | PypiClean |
/MITunaX-0.1.tar.gz/MITunaX-0.1/tuna/metadata.py | import os
from tuna.sql import DbCursor
from tuna.config_type import ConfigType
DOCKER_CMD = "sudo docker run --device='/dev/kfd' --device='/dev/dri' -w /tmp/miopenpdb \
-v /tmp/miopenpdb:/tmp/miopenpdb --user=root --group-add video --privileged=true \
--rm {} bash -c \"{}\""
MIOPEN_DB_VER... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist_site/settings/common.py | from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2013, University of Oxford"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import os
import django
import sys
import st... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/utils/util.py | import numpy
import numpy as np
import hashlib
from itertools import izip
import operator
import collections
try:
from IPython.Debugger import Tracer; debug_here = Tracer()
except ImportError:
try:
from IPython.core.debugger import Tracer; debug_here = Tracer()
except:
pass
import cPickle, z... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/dns/rdtypes/ANY/HIP.py |
# Copyright (C) 2010, 2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AN... | PypiClean |
/Hydro_Quebec_API_Wrapper-3.0.8-py3-none-any.whl/hydroqc/types/consump.py | # pylint: disable=invalid-name
from typing import TypedDict
# API URL: https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/
# portrait-de-consommation/resourceObtenirDonneesConsommationHoraires
class ConsumpHourlyResultTyping(TypedDict, total=True):
"""Consumption Hourly json sub output format."""
... | PypiClean |
/OWSLib-0.29.2.tar.gz/OWSLib-0.29.2/owslib/fes.py | from owslib.etree import etree
from owslib import util
from owslib.namespaces import Namespaces
# default variables
def get_namespaces():
n = Namespaces()
ns = n.get_namespaces(["dif", "fes", "gml", "ogc", "xs", "xsi"])
ns[None] = n.get_namespace("ogc")
return ns
namespaces = get_namespaces()
schema... | PypiClean |
/BEAT_TEST-0.13.1.tar.gz/BEAT_TEST-0.13.1/econml/tree/_tree_classes.py | import abc
import numbers
from math import ceil
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.utils.validation import check_is_fitted
from ._tree import Tree, DepthFirstTreeBuilder
from ._splitter import Splitter, BestSplitter
from ._criterion import Criterion
from . import _tree
from ..utiliti... | PypiClean |
/ConfigSpace-nni-0.4.7.tar.gz/ConfigSpace-nni-0.4.7/ConfigSpace/nx/classes/digraph.py | # Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import collections
from copy import deepcopy
import ConfigSpace.nx
from ConfigSpace.nx.classes.graph import Graph
from ConfigSpace.nx.ex... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/utils/max_recursion_limit.py | import platform
import sys
import threading
# Windows do not imp resource package
if platform.system() != "Windows":
import resource
class AlternativeRecursionLimit:
r"""A reentrant context manager for setting global recursion limits."""
def __init__(self, new_py_limit):
self.new_py_limit = new_... | PypiClean |
/NotificationServices-0.1.tar.gz/NotificationServices-0.1/providers/email.py | from notifier.controller import NotificationController
import requests
import json
from utils import exceptions
class Email(NotificationController):
def __init__(self, config = None):
self._requirement = {
"required": {"uidx" : "str", "subject" : "str", "html_body" : "str", "endpoint... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/gfx/svg.js.uncompressed.js | define("dojox/gfx/svg", ["dojo/_base/lang", "dojo/_base/window", "dojo/dom","dojo/_base/declare", "dojo/_base/array",
"dojo/dom-geometry", "dojo/_base/Color", "./_base", "./shape", "./path"],
function(lang, win, dom, declare, arr, domGeom, Color, g, gs, pathLib){
/*=====
dojox.gfx.svg = {
// module:
// dojox/gf... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/docs/source/_ext/algorithmcheckdocs.py | from pprint import pformat
from importlib import import_module
from docutils import nodes
from docutils.parsers.rst import Directive, directives
import os
class AlgorithmCheckDocs(Directive):
"""
Class which enables documentation to access algorithm_check
values for each controller
"""
has_conten... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/utils/unittest/main.py |
import sys
import os
import types
from django.utils.unittest import loader, runner
try:
from django.utils.unittest.signals import installHandler
except ImportError:
installHandler = None
__unittest = True
FAILFAST = " -f, --failfast Stop on first failure\n"
CATCHBREAK = " -c, --catch Catch co... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/localization/vi/MathML.js | MathJax.Localization.addTranslation("vi","MathML",{version:"2.7.9",isLoaded:true,strings:{BadMglyph:"mglyph h\u1ECFng: %1",BadMglyphFont:"Ph\u00F4ng ch\u1EEF h\u1ECFng: %1",MathPlayer:"MathJax kh\u00F4ng th\u1EC3 thi\u1EBFt l\u1EADp MathPlayer.\n\nN\u1EBFu MathPlayer ch\u01B0a \u0111\u01B0\u1EE3c c\u00E0i \u0111\u1EB7t... | PypiClean |
/IsDigit-0.0.10.tar.gz/IsDigit-0.0.10/README.md | # Installing
## From source:
- `pip install git+https://github.com/editid0/IsDigit`
## From pypi:
- `pip install -U IsDigit`
<br />
# Examples
```python
from isdigit import IsDigit
digits = IsDigit(allow_floats=True, allow_ints=True)
print(digits.is_digit('1')) # returns True
print(digits.is_digit('1.0')) # retur... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/data/util.py | import re
from collections import Counter
from itertools import chain, count
from typing import Callable, Union, List, Type
import numpy as np
import bottleneck as bn
from scipy import sparse as sp
RE_FIND_INDEX = r"(^{})( \((\d{{1,}})\))?$"
def one_hot(
values: Union[np.ndarray, List], dtype: Type = float,... | PypiClean |
/CC-CataLog-0.1.330.tar.gz/CC-CataLog-0.1.330/catalog/jobs/repeat.py | import typing as typ
# External Modules
# Internal Modules
from catalog.jobs.jobs import Job
from catalog.jobs.versions import current_version
from catalog.datalog.db_utils import Query
# from catalog.misc.sql_utils import STRJOB_EXACT_,STRJOB_GRAPH_,job,JOB
###############################################... | PypiClean |
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/views/user_account.py | import os
import datetime
from hashlib import sha1
import time
import base64
import hmac
import urllib
from flask import make_response
from pylot import (Pylot, utils, route, abort, redirect, request, url_for,
jsonify, session, AppError)
from pylot.component import (mailer, storage, recaptcha)
from f... | PypiClean |
/BruteCodecChecker-0.21.tar.gz/BruteCodecChecker-0.21/README.md | Have you ever seen this?
***UnicodeEncodeError: 'XXXXX' codec can't encode character 'XXXXX' in position 15: ordinal ...***
Probably more than once, right? :) After having spent too much time on finding the right codecs for files, I wrote [BruteCodecChecker](https://github.com/hansalemaos/BruteCodecChecker). BruteCo... | PypiClean |
/MIG%20Profiler-0.0.3.tar.gz/MIG Profiler-0.0.3/mig_perf/profiler/server/torch_model_runner.py | import asyncio
import bisect
import time
import numpy as np
import torch
import torch.hub
from utils.logger import Logger
# we only run 1 inference run at any time (one could schedule between several runners if desired)
from utils.model_hub import load_pytorch_model
from utils.pipeline_manager import PostProcessor, P... | PypiClean |
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/cube_ans/src/viewers/canvas_interaction/spectrumCanvas/panOnClick.py | import numpy
import weakref
from pubsub import pub
import matplotlib.pyplot as _plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from .zoomOnWheel import ZoomOnWheel
class PanOnClick(ZoomOnWheel):
"""Class providing pan & zoom interaction to a matplotlib Figure.
Left bu... | PypiClean |
/CADPR-0.1.1-py3-none-any.whl/_SearchFiles.py | class SearchFiles:
def search_files(self, directory_path: str = None, search_string: str or list = None, save_path: str = None):
"""
This function will go through a directory and all subdirectories and try to open each file no matter
if it is another directory, a sql code, hql, or python fi... | PypiClean |
/Dooders-0.0.3.tar.gz/Dooders-0.0.3/dooders/charts/functions.py | from collections import Counter
from typing import Union
import matplotlib.pyplot as plt
import numpy as np
import pygame
from dooders.charts.grid import GridViz
def perception_state_grid(cycle_count: int,
filename: str = 'perception_state_grid',
energy_positions:... | PypiClean |
/IntelliCoder-0.5.2.tar.gz/IntelliCoder-0.5.2/intellicoder/synthesizers.py | from __future__ import division, absolute_import, print_function
from logging import getLogger
import string
from collections import namedtuple
from .init import _
from .sources import (
make_c_args, make_c_str, reloc_ptr, reloc_var, make_c_header,
make_init, reloc_both, make_windll
)
from .utils import (
... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/jquery/src/event.js | define([
"./core",
"./var/strundefined",
"./var/rnotwhite",
"./var/hasOwn",
"./var/slice",
"./event/support",
"./core/init",
"./data/accepts",
"./selector"
], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support ) {
var rformElems = /^(?:input|select|textarea)$/i,
rkeyEvent = /^key/,
rmouseEve... | PypiClean |
/BabelDjango-onefinestay-0.2.4.tar.gz/BabelDjango-onefinestay-0.2.4/babeldjango/extract.py |
from babel.core import *
from django.conf import settings
settings.configure(USE_I18N=True)
from django.template import (
Lexer,
TOKEN_TEXT,
TOKEN_VAR,
TOKEN_BLOCK,
)
from django.utils.encoding import smart_unicode
from django.utils.translation.trans_real import (
block_re,
constant_re,
... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/docs/source/extending/fitting_results.rst | .. _fitting_results_extend:
#################################
Extending Fitting Results class
#################################
The FittingResult class is used to store values from the benchmarking that are
required for the fitting reports.
If this needs to be extended to allow for additional statistics or improved
... | PypiClean |
/Keg-Auth-0.7.2.tar.gz/Keg-Auth-0.7.2/keg_auth/views.py | import flask
import flask_login
import inflect
import keg.web
import sqlalchemy as sa
from blazeutils.strings import case_cw2dash
from keg.db import db
from flask_wtf.csrf import validate_csrf
from keg_auth import forms, grids, requires_permissions
from keg_auth.extensions import lazy_gettext as _, flash
try:
from... | PypiClean |
/FrozenIdea-3.1.3.tar.gz/FrozenIdea-3.1.3/CHANGELOG.rst | Changelog
=========
3.1.3
-----
- Fixed bug in channel join handling.
3.1.2
-----
- Fixed socket handling - don't send data to already closed socket.
3.1.1
-----
- Fixed py3 conversion errors.
3.1.0
-----
- Code ported to py3.
- Introduced bot_api.py, which simplifies the creation of new bots ev... | PypiClean |
/Flask%20of%20Cinema-1.0.0.tar.gz/Flask of Cinema-1.0.0/static/js/jquery.min.js | !(function (e, t) {
'use strict';
'object' == typeof module && 'object' == typeof module.exports
? (module.exports = e.document
? t(e, !0)
: function (e) {
if (!e.document)
throw new Error('jQuery requires a window with a document');
return t(e);
}... | PypiClean |
/Dero-0.15.0-py3-none-any.whl/dero/sympy.py | import datetime, os, sys
import multiprocessing as mp
from sympy import solve
class EquationSolver:
def __init__(self, log_dir=None, debug=False):
self.log_dir = log_dir
self.debug = debug
if self.log_dir:
self.log_list = []
def create_log_file(self):
... | PypiClean |
/ArcRstats-0.8.alpha.zip/ArcRstats-0.8.alpha/arc_r/ArcRstats_1.py | from win32com.client import Dispatch
import os, sys, re, time, shutil # removed: tempfile, preferable to use win32api.GetTempFileName anyways
# debug options
debug = 0 # 1 or 0
if debug:
fxn = 'glm' # 'glm' , 'cart' or 'gam'
prefix = 'D:/projects/ArcRstats/'
in_obs = prefix + 'sp_obs... | PypiClean |
/DataSae-0.1.37.tar.gz/DataSae-0.1.37/datasae/datasource/elasticsearch.py | import os
from dotenv import load_dotenv
from datetime import datetime
from datasae.datasource.config_file import get_config
from elasticsearch import Elasticsearch
class ConnectionElastic:
"""
A class to represent Elastic access and datasource.
source:
- https://elasticsearch-py.readthedo... | PypiClean |
/BuzzAlgoTrade-0.0.2.tar.gz/BuzzAlgoTrade-0.0.2/pyalgotrade/technical/hurst.py | import numpy as np
from pyalgotrade import technical
# Code Tom Starke for the Hurst Exponent.
def hurst_exp(p, minLags, maxLags):
tau = []
lagvec = []
# Step through the different lags
for lag in range(minLags, maxLags):
# produce price difference with lag
pp = np.subtract(p[lag:]... | PypiClean |
/Lagring-0.2.7.1.tar.gz/Lagring-0.2.7.1/README.md | # Lagring: asset storage for Flask
## Requirements
- SQLAlchemy
- Flask
- PostgreSQL 9.4+
## Installation
pip install lagring
If you want to use `ImageAsset` class you have to install Pillow as well.
## How to use it
0. Configure your Flask app to have necessary config options:
Parameter | Mea... | PypiClean |
/AppZoo-2023.4.25.19.12.44.tar.gz/AppZoo-2023.4.25.19.12.44/README_.md | <h1 align = "center">:rocket: App :facepunch:</h1>
---
## Install
```bash
pip install -U appzoo
```
## Usage
- Rest Api
```python
import jieba
from iapp import App
pred1 = lambda **kwargs: kwargs['x'] + kwargs['y']
pred2 = lambda x=1, y=1: x - y
pred3 = lambda text='小米是家不错的公司': jieba.lcut(text)
app = App(verbose=Tr... | PypiClean |
/Mopidy-WebLibrary-1.0.0.tar.gz/Mopidy-WebLibrary-1.0.0/mopidy_weblibrary/static/vendors/jquery_fileupload/app.js |
;(function () {
'use strict';
var isOnGitHub = window.location.hostname === 'blueimp.github.io',
url = isOnGitHub ? '//jquery-file-upload.appspot.com/' : 'server/php/';
angular.module('demo', [
'blueimp.fileupload'
])
.config([
'$httpProvider', 'fileUploadProvider'... | PypiClean |
/Avpy-0.1.3.tar.gz/Avpy-0.1.3/examples/outputWav/outputWav.py | import sys
import struct
import wave
from avpy import avMedia, Media
# wav data (see audioDump)
waveData = []
def audioDump2(buf, bufLen):
''' Store audio data
'''
# TODO: unused, remove?
global waveData
for i in range(bufLen):
waveData.append(struct.pack('B', buf[i]))
def audioDump(... | PypiClean |
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/methods/chats/set_chat_permissions.py |
from typing import Union
import hikkapyro
from hikkapyro import raw
from hikkapyro import types
class SetChatPermissions:
async def set_chat_permissions(
self: "hikkapyro.Client",
chat_id: Union[int, str],
permissions: "types.ChatPermissions",
) -> "types.Chat":
"""Set defaul... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/db/migrations/operations/fields.py | from djmodels.core.exceptions import FieldDoesNotExist
from djmodels.db.models.fields import NOT_PROVIDED
from djmodels.utils.functional import cached_property
from .base import Operation
from .utils import (
ModelTuple, field_references_model, is_referenced_by_foreign_key,
)
class FieldOperation(Operation):
... | PypiClean |
/Deep-Transit-0.1.0.tar.gz/Deep-Transit-0.1.0/src/deep_transit/train.py | from . import config
import torch
import torch.optim as optim
torch.backends.cudnn.benchmark = True
from .model import YOLOv3
from tqdm.autonotebook import tqdm
from ._utils import (
seed_everything,
average_precision,
get_evaluation_bboxes,
save_checkpoint,
load_checkpoint,
get_loaders,
)
from... | PypiClean |
/Chameleon-4.1.0.tar.gz/Chameleon-4.1.0/src/chameleon/loader.py | import functools
import logging
import os
import py_compile
import shutil
import sys
import tempfile
import warnings
from importlib.machinery import SourceFileLoader
from threading import RLock
import pkg_resources
from .utils import encode_string
lock = RLock()
acquire_lock = lock.acquire
release_lock = lock.relea... | PypiClean |
/OccuPy-0.1.13.tar.gz/OccuPy-0.1.13/docs/gallery/synthetic.md | # Malate dehydrogenase
Versions:
```
OccuPy 1.7.0
ChimeraX 1.4 (2022-06-03)
Gemmi 0.5.6
Relion 4.0-beta-2-commit-c3ddd0
```
## Alter occupancy of pdb model
Altered occupancy of one pdb model chain, generate theoretical density and estimate occupancy of the density using
OccuPy
;
exports.LogLevel = exports.getErrorMessage = exports.getBuiltSingleCommands = exports.getBuiltCommands = exports.parseSdp = exports.uuid = exports.second = void 0;
const crypto_1 = require("crypto");
const second = (_, s) => s;
exports.second ... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.