id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/GTW-1.2.6.tar.gz/GTW-1.2.6/Notification.py
from __future__ import print_function from _GTW import GTW from _TFL import TFL from _TFL.portable_repr import portable_repr from _TFL.pyk import pyk import _TFL._Meta.Object import _TFL._Meta.Once_Property import _TFL.Accessor import datetime class M_N...
PypiClean
/EQSN-0.0.8.tar.gz/EQSN-0.0.8/eqsn/worker_process.py
import logging import threading from queue import Queue from eqsn.qubit_thread import SINGLE_GATE, MERGE_SEND, MERGE_ACCEPT, MEASURE, \ MEASURE_NON_DESTRUCTIVE, GIVE_STATEVECTOR, \ CONTROLLED_GATE, NEW_QUBIT, ADD_MERGED_QUBITS_TO_DICT, CONTROLLED_TWO_GATE, \ DOUBLE_GATE, QubitThread from eqsn.shared_dict i...
PypiClean
/Classeviva.py-1.2.0.tar.gz/Classeviva.py-1.2.0/src/classeviva/main.py
from __future__ import annotations import asyncio from datetime import datetime, timezone from types import NoneType from typing import Any, Iterable from collections.abc import Iterable as IterableABC import requests from .collegamenti import collegamenti as c from .eccezioni import eccezioni as e from .variabili im...
PypiClean
/ANNOgesic-1.1.14.linux-x86_64.tar.gz/usr/local/lib/python3.10/dist-packages/annogesiclib/detect_utr.py
import math import shutil import matplotlib as mpl from annogesiclib.gff3 import Gff3Parser from annogesiclib.helper import Helper import numpy as np mpl.use('Agg') import matplotlib.pyplot as plt plt.style.use('ggplot') def plot(utr, utr_pri, utr_sec, filename, source, utr_type, base_5utr): '''plot the distribut...
PypiClean
/MParT-2.0.2.tar.gz/MParT-2.0.2/joss/paper.md
--- title: 'MParT: Monotone Parameterization Toolkit' tags: - Python - Julia - MATLAB - C++ - measure transport - transport map - density estimation - Bayesian inference - normalizing flows - machine learning authors: - name: Matthew Parno orcid: 0000-0002-9419-2693 corresponding: true ...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/static/misago/admin/momentjs/nl.js
;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; ...
PypiClean
/AppZoo-2023.4.25.19.12.44.tar.gz/AppZoo-2023.4.25.19.12.44/appzoo/apps_fastapi/nh_choice_model.py
from meutils.pipe import * from meutils.zk_utils import * from meutils.datamodels.ArticleInfo import ArticleInfo from bertzoo.utils.bert4keras_utils import * # cfg @zk.DataWatch('/mipush/nh_model') def watcher(data, stat): # (data, stat, event) ZKConfig.info = yaml.safe_load(data) cfg = get_zk_config('/mipus...
PypiClean
/CAMSA-1.3.tar.gz/CAMSA-1.3/camsa/utils/ragout/io.py
import os import re import sys from collections import defaultdict sys.path.append(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))) from camsa.utils.ragout.data_structures import RagoutSequence, Block block_id_...
PypiClean
/Honeygain.py-1.3.0.tar.gz/Honeygain.py-1.3.0/honeygain/client.py
from typing import Optional from pydantic import parse_obj_as from .exceptions import ClientException, HTTPException, SecurityCheckException from .http import HoneygainHTTP from .schemas import UserProfile, Device, TermsOfService, \ Notification, ReferralEarnings, TodayStats, DailyStats, \ Balance, HoneygainB...
PypiClean
/Flask-CouchDB-Schematics-1.0.0.tar.gz/Flask-CouchDB-Schematics-1.0.0/README.rst
Flask-CouchDB-Schematics ======================== This library helps you use CouchDB & Schmatics with Flask. forked from: https://bitbucket.org/leafstorm/flask-couchdb @ revision 3d5855f The semantics of intializing a document as changed to match the schematics models. Rather than accepting keyword arguments, the co...
PypiClean
/Flask-RESTeasy-0.0.8.tar.gz/Flask-RESTeasy-0.0.8/flask_resteasy.py
from types import MethodType from itertools import chain from functools import partial, wraps import flask from flask.json import dumps from flask.views import MethodView as Resource from flask.helpers import _endpoint_from_view_func from werkzeug.wrappers import Response as ResponseBase __version__ = "0.0.8" def u...
PypiClean
/ISPy-solar-0.2.3.tar.gz/ISPy-solar-0.2.3/ISPy/spec/calib.py
import os import numpy as np import astropy.table from scipy.interpolate import interp1d from scipy.ndimage import convolve from scipy.optimize import differential_evolution from astropy.io import fits from astropy.table import Table from astropy import units as u import matplotlib.pyplot as plt from ISPy.spec import ...
PypiClean
/BlendSCAD-20170429.0.0.2.zip/BlendSCAD-20170429.0.0.2/blendscad_convert.py
# pybraces / braces_decode # from: http://timhatch.com/projects/pybraces/#example def braces_decode(input, errors='strict'): ##global indent_width, current_depth current_depth = 0 indent_width = 4 # if not input: return (u'', 0) length = len(input) # Deal with chunked reading, where we don't get # data cont...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/users/views/activation.py
from django.core.exceptions import PermissionDenied from django.contrib.auth import get_user_model from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.utils.translation import gettext as _ from ...core.exceptions import Banned from ..bans import get_user_ban from ..decora...
PypiClean
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/doc.js
let docLoaded = false, lastSearchValue = ''; function showPage(response) { const doc = document.getElementById('doc'); if (doc) { doc.innerHTML = response.content; } document.querySelectorAll('li.test p').forEach((test) => { const submitButton = document.createElement('span'); submitButton.innerText = '=';...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/tools/environments/Virtualenv.py
import os import sys from contextlib import contextmanager from nuitka.__past__ import unicode from nuitka.Tracing import my_print from nuitka.utils.Execution import check_call, executeProcess from nuitka.utils.FileOperations import ( getDirectoryRealPath, removeDirectory, withDirectoryChange, ) class Vi...
PypiClean
/Lab2_IA-0.0.13.tar.gz/Lab2_IA-0.0.13/README.md
# UVG_IA_Lab2 Laboratorio 2 de Inteligencia Artificial PyPI: https://pypi.org/project/Lab2-IA/ PR Aprobada (0.5 pts extras!): https://github.com/SantiagoTaracena01/cool-bayesian-networks/pull/2 ## Instrucciones de empaquetamiento: python setup.py sdist bdist_wheel ## Instrucciones de instalación: pip install Lab2-IA...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/Functions/EncodingFunctions/ZLibEncodingFunction.py
#+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+-...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Export/WiresharkDissector/WiresharkFilter.py
#+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+-...
PypiClean
/DFOGN-1.0.2.tar.gz/DFOGN-1.0.2/dfogn/linear_altmov.py
from __future__ import absolute_import, division, print_function, unicode_literals from math import sqrt import numpy as np __all__ = ["max_step_in_box_and_ball"] ZERO_THRESH = 1e-14 def ball_step(x0, g, Delta): # Given initial point x0, take largest step in direction g allowed by ||x|| <= Delta # That is...
PypiClean
/BitcoinExchangeFH-2022.2.tar.gz/BitcoinExchangeFH-2022.2/befh/handler/sql_handler.py
import logging from datetime import datetime from sqlalchemy import ( create_engine, Table, Column, Integer, String, Numeric, MetaData) from .rotate_handler import RotateHandler LOGGER = logging.getLogger(__name__) class SqlHandler(RotateHandler): """Sql handler. """ def __...
PypiClean
/NucleoATAC-0.3.4.tar.gz/NucleoATAC-0.3.4/pyatac/make_vplot.py
import os import numpy as np #import matplotlib as mpl #mpl.use('PS') import pyximport; pyximport.install(setup_args={"include_dirs":np.get_include()}) from pyatac.chunk import ChunkList from pyatac.chunkmat2d import FragmentMat2D import VMat as V from multiprocessing import Pool import itertools import traceback def...
PypiClean
/Heterogeneous_Highway_Env-0.0.3-py3-none-any.whl/Heteogeneous_Highway_Env/road/spline.py
import numpy as np from scipy import interpolate from typing import List, Tuple class LinearSpline2D: """ Piece-wise linear curve fitted to a list of points. """ PARAM_CURVE_SAMPLE_DISTANCE: int = 1 # curve samples are placed 1m apart def __init__(self, points: List[Tuple[float, float]]): ...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/addon/colorpicker/color_picker_select.py
from colorsys import hsv_to_rgb from muntjac.addon.colorpicker.color import Color from muntjac.ui.custom_component import CustomComponent from muntjac.ui.vertical_layout import VerticalLayout from muntjac.ui.select import Select from muntjac.data.property import IValueChangeListener from muntjac.addon.colorpicker....
PypiClean
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/canvas/report/report.py
import itertools import time from collections import OrderedDict, Iterable from itertools import chain from AnyQt.QtCore import ( Qt, QAbstractItemModel, QByteArray, QBuffer, QIODevice, QLocale ) from AnyQt.QtGui import QColor, QBrush from AnyQt.QtWidgets import QGraphicsScene, QTableView from Orange.util import ...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/gis/admin/widgets.py
import logging from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import six from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSEx...
PypiClean
/5g_core_common_schemas-1.0.9-py3-none-any.whl/5g_core_common_schemas-1.0.9.dist-info/LICENSE.md
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, ...
PypiClean
/ArseinRubika-5.1.1-py3-none-any.whl/arsein/Getheader.py
import aiohttp import asyncio from arsein.Encoder import encoderjson from arsein.PostData import method_Rubika,httpfiles,_download_with_server from json import loads from pathlib import Path from arsein.Clien import clien from base64 import b64decode class Upload: def __init__(self, Sh_account:str,privateKey): ...
PypiClean
/MqttSqliteLogger-1.0.tar.gz/MqttSqliteLogger-1.0/README.md
# mqttSqLite logger mqttSqLite logger is a lightweight logger for MQTT brokers. It allows you to log all the published data under spectific topics and retrieve them for posterior data analysis. The logger is totally managed over mqtt, so you can add, remove or query your topics without sql sintax. ## Installation an...
PypiClean
/FitBridge-0.1.tar.gz/FitBridge-0.1/README.md
# FitBridge --WIP-- Simple script to sync Gadgetbridge exported data to Google Fit ## Install and Usage This project is not recommended for normal users because it's not user friendly at all. I strongly suggest to only use this script if you know what you're doing. 1. Go to the [Google API Console](https...
PypiClean
/Lab93-Finance-0.0.1.4.tar.gz/Lab93-Finance-0.0.1.4/src/Lab93_Finance/reporting/__init__.py
from glob import glob from os import system as command class FSLinker: def __init__( self, data, date, asset_basepath: str = "/server/front-end/assets/data-science/reports", target_directory: str = "/server/front-end/_posts/reports" ): self.date = date; self.data ...
PypiClean
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/js/7117.b2e9eb70.chunk.js
"use strict";(self.webpackChunkreact_admin_upgrade=self.webpackChunkreact_admin_upgrade||[]).push([[7117],{27117:function(e,t,n){n.r(t),n.d(t,{TagAngleInterpolationBracket:function(){return w},TagAngleInterpolationDollar:function(){return B},TagAutoInterpolationBracket:function(){return $},TagAutoInterpolationDollar:fu...
PypiClean
/Deepcell_Data_Processing-0.1.0.tar.gz/Deepcell_Data_Processing-0.1.0/README.md
# deepcell-data-processing [![PyPI version](https://badge.fury.io/py/Deepcell-Data-Processing.svg)](https://badge.fury.io/py/Deepcell-Data-Processing) [![Build Status](https://travis-ci.com/vanvalenlab/deepcell-data-processing.svg?branch=master)](https://travis-ci.com/vanvalenlab/deepcell-data-processing) [![Coverage ...
PypiClean
/GalSim-2.4.11-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl/galsim/detectors.py
import numpy as np import sys from .image import Image from .errors import GalSimRangeError, GalSimValueError, GalSimIncompatibleValuesError, galsim_warn def applyNonlinearity(self, NLfunc, *args): """ Applies the given non-linearity function (``NLfunc``) on the `Image` instance directly. This routine c...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/box2d/carracing/envs/carracing_env.py
from typing import Optional import copy import os import gym import numpy as np from easydict import EasyDict from ding.envs import BaseEnv, BaseEnvTimestep from ding.envs import ObsPlusPrevActRewWrapper from ding.envs.common import affine_transform, save_frames_as_gif from ding.torch_utils import to_ndarray from din...
PypiClean
/LatticeFinder/plotting_methods.py
import numpy as np import matplotlib.pyplot as plt def get_plotting_lims(lattice_point,percent_diff): lattice_point_diff = max(lattice_point) - min(lattice_point) lattice_point_diff_with_percent = lattice_point_diff*(percent_diff/100.0) lattice_point_low = min(lattice_point) - lattice_point_diff_with_percent ...
PypiClean
/Helmholtz-0.2.0.tar.gz/Helmholtz-0.2.0/helmholtz/recording/forms.py
from django import forms from django.forms.extras import SelectDateWidget from django.contrib.contenttypes.models import ContentType from helmholtz.stimulation.models import Stimulus from helmholtz.equipment.models import DeviceConfiguration, Setup from helmholtz.species.models import Strain from helmholtz.preparations...
PypiClean
/Nitrous-0.9.3-py3-none-any.whl/turbogears/i18n/data/ar.py
languages={'el': u'\u0627\u0644\u064a\u0648\u0646\u0627\u0646\u064a\u0629', 'gu': u'\u0627\u0644\u063a\u0648\u062c\u0627\u0631\u0627\u062a\u064a\u0629', 'en': u'\u0627\u0644\u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629', 'zh': u'\u0627\u0644\u0635\u064a\u0646\u064a\u0629', 'sw': u'\u0627\u0644\u0633\u0648\u0627\u06...
PypiClean
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/specialchar/dialogs/lang/it.js
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("specialchar","it",{euro:"Simbolo Euro",lsquo:"Virgoletta singola sinistra",rsquo:"Virgoletta singola destra",ldquo:"Virgolette aperte",rdquo:"Virgol...
PypiClean
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/fileutils.py
from __future__ import absolute_import import os from os.path import islink, realpath, join import shutil import sys import tempfile import codecs # Modified recipe: paths_from_path_patterns (0.5) def should_include_path(path, includes=None, excludes=None, isRemotePath=False): """Return True iff the given path sh...
PypiClean
/Nuphy-0.2.17.tar.gz/Nuphy-0.2.17/nuphy/main.py
#print("i... main nuphy is being run") ok import nuphy.compounds as srcomp from nuphy.nubase import gas,densities,elements,molarweights import nuphy.sr as sr import nuphy.srim as srim ############################################################### SRIM # # srim - first functions - # #################...
PypiClean
/BYONDTools-0.1.8.zip/BYONDTools-0.1.8/byond/basetypes.py
AREA_LAYER = 1 TURF_LAYER = 2 OBJ_LAYER = 3 MOB_LAYER = 4 FLY_LAYER = 5 # @formatter:off COLORS = { 'aqua': '#00FFFF', 'black': '#000000', 'blue': '#0000FF', 'brown': '#A52A2A', 'cyan': '#00FFFF', 'fuchsia': '#FF00FF', 'gold': '#FFD700', 'gray': '#808080', 'green'...
PypiClean
/GPyM-0.60b.tar.gz/GPyM-0.60b/get_path.py
import os,sys from optparse import OptionParser from parse_fname_trmm import parse_fname_trmm from parse_fname_gpm import parse_fname_gpm def get_path(srcDir, sDTime, eDTime): ''' select GPM(hdf5) and TRMM(hdf4) files and return their paths) ''' prjName, prdLv, prdVer = sr...
PypiClean
/AIKIF-0.2.2.tar.gz/AIKIF-0.2.2/aikif/toolbox/file_tools.py
import os import glob import shutil import aikif.lib.cls_filelist as mod_fl exclude_folders = [ os.sep + 'venv', os.sep + 'venv2', os.sep + '__pycache__', os.sep + 'htmlcov' ] def get_filelist(fldr): """ extract a list of files from fldr """ ...
PypiClean
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/exchange/validator.py
from typing import Any, Union from web3 import Web3 from web3.providers.base import BaseProvider from zero_ex import json_schemas from zero_ex.contract_wrappers.order_conversions import order_to_jsdict from ..bases import Validator class ExchangeValidator(Validator): """Validate inputs to Exchange methods."""...
PypiClean
/Bank%20Package%20-%20Aamir%20and%20Conrad-1.0.1.tar.gz/Bank Package - Aamir and Conrad-1.0.1/README.md
Group: Conrad Yeung and Aamir Khan Pypi: https://pypi.org/project/Bank-Package-Aamir-and-Conrad/ [![Build Status](https://travis-ci.org/Conrad-Yeung/Data-533-Lab-4.svg?branch=master)](https://travis-ci.org/Conrad-Yeung/Data-533-Lab-4) ### ***Bank*** This package can be used to manage bank customers. There are two ...
PypiClean
/CPM-Bee-2023.5.30.14.12.33.tar.gz/CPM-Bee-2023.5.30.14.12.33/data/openai_keys.md
# openai api key 免费分享 - 客户端使用教程 ```python import openai openai.api_base = 'https://api.openai-proxy.com/v1' # 'https://proxy.aidashi.wiki/v1' openai.api_key = "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" prompt = "你好" completion = openai.Completion.create(prompt=prompt, stream=True, model="text-davinci-003", ...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/code_generation/ListCodes.py
from .CodeHelpers import ( assignConstantNoneResult, decideConversionCheckNeeded, generateChildExpressionCode, generateChildExpressionsCode, generateExpressionCode, withCleanupFinally, withObjectCodeTemporaryAssignment, ) from .ErrorCodes import ( getErrorExitBoolCode, getErrorExitCo...
PypiClean
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/torchdistill-test/torchdistill/core/training.py
import torch from torch import distributed as dist from torch import nn from torch.optim.lr_scheduler import ReduceLROnPlateau, LambdaLR from torchdistill.common.constant import def_logger from torchdistill.common.module_util import check_if_wrapped, freeze_module_params, get_module, \ unfreeze_module_params, get_...
PypiClean
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/methods/messages/copy_media_group.py
from datetime import datetime from typing import Union, List import fipper from fipper import types, utils, raw class CopyMediaGroup: async def copy_media_group( self: "fipper.Client", chat_id: Union[int, str], from_chat_id: Union[int, str], message_id: int, captions: Uni...
PypiClean
/Carpenter-1.0.2.zip/Carpenter-1.0.2/carpenter/regex/types.py
import re from location import _not_prefixed_impl, _not_followed_impl ''' This matches any integer based number with a possible '+-' prepended. It does not match any floating point numbers ''' _contains_integer_impl = r"(?:[-+]?(?:[0-9]+))" contains_integer_regex = re.compile(_contains_integer_impl) ''' Like contai...
PypiClean
/Flask-pysnow-0.1.3.tar.gz/Flask-pysnow-0.1.3/flask_pysnow.py
__author__ = "Robert Wikman <rbw@vault13.org>" __version__ = "0.1.3" from flask import current_app try: from flask import _app_ctx_stack as stack except ImportError: from flask import _request_ctx_stack as stack from pysnow import Client, OAuthClient class Pysnow(object): """Central controller class th...
PypiClean
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/errors/rpc_error.py
import re from datetime import datetime from importlib import import_module from typing import Type, Union from pyrogram import raw from pyrogram.raw.core import TLObject from .exceptions.all import exceptions class RPCError(Exception): ID = None CODE = None NAME = None MESSAGE = "{value}" def ...
PypiClean
/MetaPathways-3.1.6.tar.gz/MetaPathways-3.1.6/metapathways/annotate/__init__.py
import datetime import re from metapathways.annotate import location # Sequences class Sequence(object): """Defines a biological sequence.""" def __init__(self, sequence): self.sequence = sequence def __iter__(self): return iter(self.sequence) def __str__(self): return self...
PypiClean
/OceanMonkey-1.0.0.tar.gz/OceanMonkey-1.0.0/oceanmonkey/core/filters.py
import six import abc import hashlib from w3lib.url import canonicalize_url from oceanmonkey.core import request from oceanmonkey.core.database import RedisDataType class BaseDuplicatesFilter(abc.ABC): @abc.abstractmethod def seen(self, value, **kwargs): """ nothing to do, just in a daze """ @ab...
PypiClean
/Mopidy-Jellyfin-1.0.4.tar.gz/Mopidy-Jellyfin-1.0.4/mopidy_jellyfin/ws_client.py
from __future__ import division, absolute_import, print_function, unicode_literals ################################################################################################# import json import logging import time import requests import threading import mopidy_jellyfin from .http import JellyfinHttpClient impo...
PypiClean
/Nib-0.5.7.tar.gz/Nib-0.5.7/nib/plugins/pagination.py
from __future__ import absolute_import, division, print_function, unicode_literals from os import path try: from urllib.parse import urlparse, urlunparse, ParseResult except ImportError: from urlparse import urlparse, urlunparse, ParseResult from nib import Processor, after, Document @after class PaginationP...
PypiClean
/BYONDTools-0.1.8.zip/BYONDTools-0.1.8/README.rst
========== BYONDTools ========== A set of tools for BYOND-based games. Overview -------- This is a toolkit for developers of BYOND-based games intended to do common, complex tasks that the engine itself does not currently possess. It also exposes common interfaces for developers wishing to obtain information from t...
PypiClean
/Bivouac-0.1.1.tar.gz/Bivouac-0.1.1/bivouac/user.py
import hashlib from pymongo import Connection from bson import ObjectId class User (dict): '''User Object''' @staticmethod def _get_user_collection(): if not hasattr(User, '_collection'): connection = Connection('localhost', 27017) db = connection.projectlist ...
PypiClean
/MopidyCLI-0.2.0.tar.gz/MopidyCLI-0.2.0/mopidycli/cli.py
from __future__ import unicode_literals import sys import os import logging logging.basicConfig(level=logging.INFO) import argparse import jsonrpclib ## HELPER FUNCTIONS ## def getServer(): ip = os.environ.get('MOPIDYSERVER', '127.0.0.1:6680') return jsonrpclib.Server('http://{}/mopidy/rpc'.format(ip)) def ...
PypiClean
/AioMemcached-0.8.4.tar.gz/AioMemcached-0.8.4/aiomemcached/pool.py
import asyncio from asyncio.streams import StreamReader, StreamWriter from collections import deque from .constants import DEFAULT_POOL_MAXSIZE, DEFAULT_POOL_MINSIZE, DEFAULT_TIMEOUT from .exceptions import ConnectException __all__ = ["MemcachedPool", "MemcachedConnection"] class MemcachedConnection: def __init...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/LICENSE.rst
GNU General Public License ========================== *Version 2, June 1991* *Copyright © 1989, 1991 Free Software Foundation, Inc.* *51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA* Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Prea...
PypiClean
/MultiEL-0.5.tar.gz/MultiEL-0.5/bela/utils/prediction_utils.py
# This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import defaultdict from functools import lru_cache from bela.evaluation.model_eval import ModelEval from bela.transforms.spm_transform import SPMTransform @lru_cache def get_...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/trackers/strongsort/deep/models/inceptionresnetv2.py
from __future__ import division, absolute_import import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo __all__ = ['inceptionresnetv2'] pretrained_settings = { 'inceptionresnetv2': { 'imagenet': { 'url': 'http://data.lip6.fr/cadene/pretrainedmodels/inceptionre...
PypiClean
/125softNLP-0.0.1-py3-none-any.whl/kashgari/callbacks.py
# author: BrikerMan # contact: eliyar917@gmail.com # blog: https://eliyar.biz # file: callbacks.py # time: 2019-05-22 15:00 from sklearn import metrics from kashgari import macros from tensorflow.python import keras from kashgari.tasks.base_model import BaseModel from seqeval import metrics as seq_metrics class Ev...
PypiClean
/FixThaiPDF-0.1.tar.gz/FixThaiPDF-0.1/fixthaipdf/core.py
from pythainlp.util import normalize from pythainlp import thai_lead_vowels,thai_digits,thai_below_vowels,thai_above_vowels,thai_follow_vowels,thai_characters,thai_tonemarks,thai_consonants from pythainlp.corpus import thai_words from pythainlp.tokenize import Tokenizer,Trie import re from fixthaipdf.dict import replac...
PypiClean
/Flask-OFAUTH-0.1.7.tar.gz/Flask-OFAUTH-0.1.7/flask_ofauth/__init__.py
import os import re import json import fnmatch import requests import traceback from functools import wraps from flask import g, jsonify, session, redirect, request __author__ = 'lufeng' token_re = re.compile(r"\??\b_token=\w+&?") def res_json(code, data, message, success, **kwargs): res = jsonify( cod...
PypiClean
/3Di_cmd_client-0.0.3.tar.gz/3Di_cmd_client-0.0.3/README.md
# The 3Di command line client The 3Di command line client allows for - Defining and running 3Di scenarios from the command line. - Assembling different scenarios as a "suite" that will be run in batch. - Management commands, for instance to list currently running simulations. There are three main entry po...
PypiClean
/NehorayRapid-0.0.1-py3-none-any.whl/mmedit/models/losses/pixelwise_loss.py
import torch import torch.nn as nn import torch.nn.functional as F from ..registry import LOSSES from .utils import masked_loss _reduction_modes = ['none', 'mean', 'sum'] @masked_loss def l1_loss(pred, target): """L1 loss. Args: pred (Tensor): Prediction Tensor with shape (n, c, h, w). targ...
PypiClean
/DukeDSClient-2.0.2.tar.gz/DukeDSClient-2.0.2/ddsc/core/upload.py
import datetime from ddsc.core.localstore import LocalProject from ddsc.core.remotestore import RemoteStore from ddsc.core.util import ProgressPrinter, ProjectWalker from ddsc.core.projectuploader import UploadSettings, ProjectUploader, ProjectUploadDryRun class ProjectUpload(object): """ Allows uploading a l...
PypiClean
/FragPELE-2.1.1.tar.gz/FragPELE-2.1.1/frag_pele/Growing/template_selector.py
import sys import re import os import string import pandas as pd import logging # Getting the name of the module for the log system logger = logging.getLogger(__name__) def trajectory_selector(output, path_to_file="/growing_output", report="report", trajectory="trajectory.pdb", criteria="Bind...
PypiClean
/CADET-Python-0.14.tar.gz/CADET-Python-0.14/cadet/cadet.py
from addict import Dict import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore",category=FutureWarning) import h5py import numpy import subprocess import pprint import copy import json import filelock import contextlib from pathlib import Path from cadet.cadet_dll import CadetDLL c...
PypiClean
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/errors/rpcbaseerrors.py
from ..tl import functions _NESTS_QUERY = ( functions.InvokeAfterMsgRequest, functions.InvokeAfterMsgsRequest, functions.InitConnectionRequest, functions.InvokeWithLayerRequest, functions.InvokeWithoutUpdatesRequest, functions.InvokeWithMessagesRangeRequest, functions.InvokeWithTakeoutReque...
PypiClean
/EpiTator-1.3.5.tar.gz/EpiTator-1.3.5/epitator/raw_number_annotator.py
from __future__ import absolute_import from .annotator import Annotator, AnnoTier from .annospan import AnnoSpan from .spacy_annotator import SpacyAnnotator from .date_annotator import DateAnnotator from . import utils import re infinity = float('inf') def is_valid_number(num_string): """ Check that number ...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/metadrive/env/drive_wrapper.py
from typing import Any, Dict, Optional from easydict import EasyDict import matplotlib.pyplot as plt import gym import copy import numpy as np from ding.envs.env.base_env import BaseEnvTimestep from ding.torch_utils.data_helper import to_ndarray from ding.utils.default_helper import deep_merge_dicts from dizoo.metadriv...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/axis2d/Invisible.js
define("dojox/charting/axis2d/Invisible",["dojo/_base/lang","dojo/_base/declare","./Base","../scaler/linear","dojox/gfx","dojox/lang/utils","dojox/lang/functional","dojo/string"],function(_1,_2,_3,_4,g,du,df,_5){ var _6=du.merge,_7=4,_8=45; return _2("dojox.charting.axis2d.Invisible",_3,{defaultParams:{vertical:false,f...
PypiClean
/Glances-3.4.0.3.tar.gz/Glances-3.4.0.3/glances/programs.py
# from glances.logger import logger # This constant defines the list of available processes sort key sort_programs_key_list = ['cpu_percent', 'memory_percent', 'cpu_times', 'io_counters', 'name'] def processes_to_programs(processes): """Convert a list of processes to a list of programs.""" # Start to build ...
PypiClean
/88orm-0.1.9.1.tar.gz/88orm-0.1.9.1/orm88/connector.py
__author__ = "Rimba Prayoga" __copyright__ = "Copyright 2019, 88Spares" __credits__ = ["88 Tech"] __maintainer__ = "Rimba Prayoga" __email__ = "rimba47prayoga@gmail.com" __status__ = "Development" import base64 import json from datetime import date, datetime from typing import List from urllib.parse import urljoin ...
PypiClean
/Amplo-0.17.0.tar.gz/Amplo-0.17.0/amplo/base/objects.py
from __future__ import annotations import inspect import logging from abc import ABCMeta, abstractmethod from collections import defaultdict from dataclasses import dataclass from typing import Any from warnings import warn import numpy.typing as npt import pandas as pd from sklearn.base import clone from typing_exte...
PypiClean
/Modular_computer_vision_API-0.3.29-py3-none-any.whl/mcvapi/filters/adaptative_threshold.py
import cv2 from mcvapi.mcvbase import MCVBase # for compatibility between opencv 2 and 3 try: # OpenCV 2 CV_ADAPTIVE_THRESH_MEAN_C = cv2.cv.CV_ADAPTIVE_THRESH_MEAN_C THRESH_BINARY = cv2.cv.CV_THRESH_BINARY except: # OpenCV 3 CV_ADAPTIVE_THRESH_MEAN_C = cv2.ADAPTIVE_THRESH_MEAN_C THR...
PypiClean
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/interface/graphical_actions/diagram_add_graphical_element_action.py
from typing import List, Dict, Any from muphyn.packages.interface.graphical_actions.abstract_diagram_action import AbstractDiagramAction from muphyn.packages.interface.models.graphical_models.box_model import BoxModel from muphyn.packages.interface.models.signals_model.abstract_signal_model import AbstractSignalModel ...
PypiClean
/BOTMotion-0.2.tar.gz/BOTMotion-0.2/README.txt
Synapticon BOT Motion Module ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |Synapticon| Control our BOT Motion Module Axis over Ethernet with the **CANOpen CiA402** standard. Choose between three control modes - Position (CSP) - Velocity (CSV) - Torque (CST) Example ^^^^^^^ .. code:: python import botmotion # Create a...
PypiClean
/CATCHM-0.1-py3-none-any.whl/catchm/inductive.py
from multiprocessing import Pool import pandas as pd from functools import partial import numpy as np from tqdm import tqdm def inductive_pooling(edgelist, embeddings, G, workers, gamma=1000, dict_node=None, average_embedding=True): #dict of tuples to array edgearray = np.array([[str(id), v[0], v[...
PypiClean
/IMTreatment-1.3.2.tar.gz/IMTreatment-1.3.2/README.rst
==================================== IMTreatment - A fields study package ==================================== .. image:: https://gitlab.com/gitlab-org/gitlab-ce/badges/master/build.svg :target: https://gitlab.com/gabylaunay/IMTreatment/commits/master :alt: Build status .. image:: https://gitlab.com/gitlab-org/gi...
PypiClean
/NREL-jade-0.9.9.tar.gz/NREL-jade-0.9.9/jade/spark/metrics.py
import logging import requests from pathlib import Path from jade.exceptions import ExecutionError from jade.utils.utils import dump_data logger = logging.getLogger(__name__) class SparkMetrics: """Records metrics from a Spark cluster""" METRICS_FILE = "metrics.json" def __init__(self, manager_node,...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/addon/fold/foldgutter.js
(function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror"), require("./foldcode")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "./foldcode"], mod); else // Plain browser env mod(CodeMirr...
PypiClean
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/table/dialogs/table.js
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ (function(){function r(a){for(var e=0,l=0,k=0,m,g=a.$.rows.length;k<g;k++){m=a.$.rows[k];for(var d=e=0,c,b=m.cells.length;d<b;d++)c=m.cells[d],e+=c.colSpan;e>l&&(l=e)}return ...
PypiClean
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/sampledata/README.md
# annalist_site.test Contains data used when running Django tests. empty/ contains a copy of the site data used to initialize a new (empty) site. testinit/ contains a copy of the site data used to initialize the site used for testing. data/ contains the site that is actually modified by the tests The test suite also...
PypiClean
/InteractionsChatExporter-2.5.4.tar.gz/InteractionsChatExporter-2.5.4/chat_exporter/construct/assets/attachment.py
import math from chat_exporter.ext.discord_utils import DiscordUtils from chat_exporter.ext.html_generator import ( fill_out, img_attachment, msg_attachment, audio_attachment, video_attachment, PARSE_MODE_NONE, ) class Attachment: def __init__(self, attachments, guild): self.attac...
PypiClean
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/module/qat/conv_transpose_bn.py
from ...functional import ones, relu, sqrt, sum, zeros from .. import conv_transpose_bn as Float from .module import QATModule class _ConvTransposeBnActivation2d(Float._ConvTransposeBnActivation2d, QATModule): def get_batch_mean_var(self, inp): def _sum_channel(inp, axis=0, keepdims=True): if ...
PypiClean
/Flask-User-1.0.2.2.tar.gz/Flask-User-1.0.2.2/README.rst
Flask-User v1.0 =============== .. image:: https://travis-ci.org/lingthio/Flask-User.svg?branch=master :target: https://travis-ci.org/lingthio/Flask-User .. image:: https://codecov.io/gh/lingthio/Flask-User/branch/master/graph/badge.svg :target: https://codecov.io/gh/lingthio/Flask-User .. image:: https://im...
PypiClean
/bareon-0.0.1a3.tar.gz/bareon-0.0.1a3/bareon/utils/lvm.py
from bareon import errors from bareon.openstack.common import log as logging from bareon.utils import utils LOG = logging.getLogger(__name__) def pvdisplay(): # unit m means MiB (power of 2) output = utils.execute( 'pvdisplay', '-C', '--noheading', '--units', 'm', '-...
PypiClean
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/contact_page/__init__.py
from flask import request, redirect, url_for from portfolio import Portfolio, utils, route from portfolio.ext import mailer, recaptcha Portfolio.register_component_template_static(__name__) def view(**kwargs): template_dir = kwargs["template_dir"] if "template_dir" \ i...
PypiClean
/MIAvisual-0.0.6-py3-none-any.whl/matplotlib/backend_tools.py
import enum import re import time from types import SimpleNamespace import uuid from weakref import WeakKeyDictionary import numpy as np import matplotlib as mpl from matplotlib._pylab_helpers import Gcf from matplotlib import _api, cbook class Cursors(enum.IntEnum): # Must subclass int for the macOS backend. ...
PypiClean
/BlastRadius-0.1.23.tar.gz/BlastRadius-0.1.23/blastradius/server/static/js/bootstrap.min.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=...
PypiClean
/FicusFramework-3.1.0.post2.tar.gz/FicusFramework-3.1.0.post2/src/api/model/AlgorithmFdInputWrapper.py
from api.model.FdInputWrapper import FdInputWrapper from libs.utils import get_algo_abs_path from api.model.FactDatasource import FactDatasource import os class AlgorithmFdInputWrapper(FdInputWrapper): """ 算法fd输入的一个包装 """ sub_path: str = None input_stream = None def __init__(self, site: str,...
PypiClean
/JMBG%20Validator-1.0.2.tar.gz/JMBG Validator-1.0.2/jmbg_validator/main.py
import re from datetime import datetime import argparse from sys import exit from jmbg_validator.exceptions import ( InvalidJMBG, InvalidJMBGLength, InvalidDateException, NotANumber, InvalidRegion, ) from jmbg_validator.matrices import REGION_MATRIX from jmbg_validator.output import JMBG REGEX = ...
PypiClean
/Flat-0.3.2.tar.gz/Flat-0.3.2/flat/text.py
from xml.sax.saxutils import escape from .color import gray, spot, overprint from .misc import dump, inf, rmq, scale from .path import elevated import re linebreaks = re.compile(r'\r\n|[\n\v\f\r\x85\u2028\u2029]') boundaries = re.compile(r'([^\s-]+-?|-|^)(\s*)') class style(object): __slots__ = 'font',...
PypiClean
/KD_Lib-0.0.32.tar.gz/KD_Lib-0.0.32/KD_Lib/KD/vision/RCO/rco.py
from copy import deepcopy import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.tensorboard import SummaryWriter from KD_Lib.KD.common import BaseClass class RCO(BaseClass): """ Implementation of equal epoch interval r...
PypiClean
/DeepGProp-1.0.8-py3-none-any.whl/dgp/utils.py
from pathlib import Path from typing import List, Set import numpy as np import pandas as pd from tabulate import tabulate from dgp.proben import Proben1Partition, Proben1Split from dgp.settings import PROBEN1_DIR_PATH class DatasetNotFoundError(FileNotFoundError): """Path to dataset does not exist.""" def r...
PypiClean