id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/FastFlask-1.2.32-py3-none-any.whl/jinja2/idtracking.py
import typing as t from . import nodes from .visitor import NodeVisitor VAR_LOAD_PARAMETER = "param" VAR_LOAD_RESOLVE = "resolve" VAR_LOAD_ALIAS = "alias" VAR_LOAD_UNDEFINED = "undefined" def find_symbols( nodes: t.Iterable[nodes.Node], parent_symbols: t.Optional["Symbols"] = None ) -> "Symbols": sym = Symb...
PypiClean
/MatSense-0.4.0-py3-none-any.whl/matsense/visual/player.py
from enum import IntEnum try: import readline except ImportError: pass from numpy import reshape from types import GeneratorType class MODE(IntEnum): """Pre-defined visualization modes. Attributes: STREAM (int): constantly get stream data and visualize INTERACTIVE (int): Description """ STREAM = ...
PypiClean
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/bill_repeat_frequency.py
import re # noqa: F401 import sys # noqa: F401 from firefly_iii_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type,...
PypiClean
/ClassificaIO-1.1.5.1.tar.gz/ClassificaIO-1.1.5.1/README.rst
ClassificaIO ============ This repository contains ClassificaIO, a Python package that provides a graphical user (GUI) for machine learning classification algorithms from scikit-learn. ClassificaIO Installation Instructions ====================================== A. INSTALLATION --------------- Recommended Pre-Ins...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/ui/upload.py
from warnings import warn from muntjac.ui.abstract_component import AbstractComponent from muntjac.ui.component import \ IFocusable, Event as ComponentEvent from muntjac.terminal.stream_variable import \ IStreamVariable, IStreamingEvent from muntjac.terminal.gwt.server.exceptions import \ NoInputStreamE...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/import_scripts/methylation.py
#Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #copi...
PypiClean
/Brain-Brew-0.3.10.tar.gz/Brain-Brew-0.3.10/brain_brew/build_tasks/crowd_anki/notes_to_crowd_anki.py
from dataclasses import dataclass, field from typing import Optional, Union, List from brain_brew.build_tasks.crowd_anki.shared_base_notes import SharedBaseNotes from brain_brew.build_tasks.overrides.notes_override import NotesOverride from brain_brew.configuration.part_holder import PartHolder from brain_brew.configu...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/db/backends/sqlite3/operations.py
import datetime import decimal import uuid from functools import lru_cache from itertools import chain from django.conf import settings from django.core.exceptions import FieldError from django.db import utils from django.db.backends.base.operations import BaseDatabaseOperations from django.db.models import aggregates...
PypiClean
/Django-Drupal-Password-Hasher-0.1.1.tar.gz/Django-Drupal-Password-Hasher-0.1.1/README.txt
============================= Django-Drupal Password Hasher ============================= Django-Drupal Password Hasher is a simple package created to hash Drupal 7 passwords with the prefix 'drupal'. Taken from https://djangosnippets.org/snippets/3030/ Installation typically looks like:: pip install Django-dr...
PypiClean
/Aggrescan3D-1.0.2.tar.gz/Aggrescan3D-1.0.2/a3d_gui/static/js/jquery.dataTables.min.js
(function(Da,P,l){var O=function(h){function V(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),d[c]=e,"o"===b[1]&&V(a[e])});a._hungarianMap=d}function G(a,b,c){a._hungarianMap||V(a);var d;h.each(b,functi...
PypiClean
/Enemizer-2.1.3.tar.gz/Enemizer-2.1.3/src/enemizer.py
import oead from enemizer.enemizer_config import EnemizerConfig from pathlib import Path from random import randint, choice from enemizer.utils import DEFAULTS, get_evaluated_weights, get_item_table, is_enemy, to_oead, get_item_tables class Enemizer: def __init__(self, ops: EnemizerConfig): self.arrow_we...
PypiClean
/Mastodon.py-1.8.1.tar.gz/Mastodon.py-1.8.1/mastodon/admin.py
from .versions import _DICT_VERSION_ADMIN_ACCOUNT, _DICT_VERSION_REPORT, _DICT_VERSION_HASHTAG, _DICT_VERSION_STATUS, _DICT_VERSION_CARD, \ _DICT_VERSION_ADMIN_DOMAIN_BLOCK, _DICT_VERSION_ADMIN_MEASURE, _DICT_VERSION_ADMIN_DIMENSION, _DICT_VERSION_ADMIN_RETENTION from .errors import MastodonIll...
PypiClean
/Newgram-0.0.5.tar.gz/Newgram-0.0.5/newgram/methods/messages/edit_message_text.py
from typing import Union, List, Optional import newgram from newgram import raw, enums from newgram import types from newgram import utils class EditMessageText: async def edit_message_text( self: "newgram.Client", chat_id: Union[int, str], message_id: int, text: str, par...
PypiClean
/Heralding-1.0.7.tar.gz/Heralding-1.0.7/heralding/capabilities/postgresql.py
import struct import logging from heralding.capabilities.handlerbase import HandlerBase logger = logging.getLogger(__name__) class PostgreSQL(HandlerBase): async def execute_capability(self, reader, writer, session): try: await self._handle_session(session, reader, writer) except struct.error as ex...
PypiClean
/BASEmesh-2.2.0.post1-cp311-cp311-win_amd64.whl/basemesh/_pslg_builder/_builder.py
import array import collections import itertools import warnings from typing import Deque, Iterable, List, Optional, Tuple, Union from .._algorithms import (dist_2d, interpolate_line, line_intersection, line_segments_intersection, point_on_line) from ..errors import BasemeshWarning, Topolog...
PypiClean
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Control/Attribution.js
* @requires OpenLayers/Control.js */ /** * Class: OpenLayers.Control.Attribution * The attribution control adds attribution from layers to the map display. * It uses 'attribution' property of each layer. * * Inherits from: * - <OpenLayers.Control> */ OpenLayers.Control.Attribution = OpenLayers.Class(Open...
PypiClean
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/fuse.sh
usage(){ echo " Written by Brian Bushnell Last modified April 4, 2018 Description: Fuses sequences together, padding gaps with Ns. Usage: fuse.sh in=<input file> out=<output file> pad=<number of Ns> Parameters: in=<file> The 'in=' flag is needed if the input file is not the first parameter...
PypiClean
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/ump/main_base.py
import os from os import path from pyexpat import model import numpy as np import pandas as pd import math, copy from abc import abstractmethod import scipy.optimize as sco from ultron.ump.core import env as UMPEnv from ultron.kdutils.parallel import delayed, Parallel from ultron.kdutils import file as file_util from u...
PypiClean
/Descriptive%20Markup%20Toolkit-0.1.tar.gz/Descriptive Markup Toolkit-0.1/examples/simple/parser.py
import re, os from os.path import join from dmlt.machine import MarkupMachine, Directive, RawDirective, \ rule, bygroups from dmlt.utils import escape, strip_ext, parse_child_nodes, filter_stream, \ load_tree, dump_tree import nodes # Some terms the lexer understands as URL. # Note that this list is far from ...
PypiClean
/LightSim2Grid-0.7.4-cp310-cp310-win_amd64.whl/lightsim2grid/gridmodel/_aux_add_trafo.py
import warnings import numpy as np def _aux_add_trafo(converter, model, pp_net): """ Add the transformers of the pp_net into the lightsim2grid "model" Parameters ---------- converter model pp_net Returns ------- """ if "parallel" in pp_net.trafo and np.any(pp_net.trafo["...
PypiClean
/Histopedia-0.0.5.tar.gz/Histopedia-0.0.5/README.md
# Histopedia # README This Python library provides several functions for working with historical data including events, inventions, discoveries, people, and prehistoric animals. ## Functions | Function Name | Description | Example Usage | | --- | --- | --- | | `proximate(year)` | Returns a list of events within 2 ye...
PypiClean
/4scanner-1.6.3.tar.gz/4scanner-1.6.3/scanner/thread_scanner.py
import time import json import os import re from scanner import downloader, imageboard_info from scanner.config import DB_FILE, currently_downloading import sqlite3 import subprocess import urllib.request import threading import http.client class thread_scanner: def __init__(self, keywords_file:str, output:str, q...
PypiClean
/Flask-WXPay-1.0.5.tar.gz/Flask-WXPay-1.0.5/README.rst
微信支付Flask扩展 =================== 文档 ---- 帮助文档: http://flask-wxpay.readthedocs.io/en/latest/ 使用 ---- initialized:: from flask_wxpay import WXPay wxpay = WXPay() wxpay.init_app(app) 创建订单,生成prepay data:: from flask_wxpay import now_str from core import wxpay out_trade_no = now_str() ord...
PypiClean
/AHRS-0.3.1-py3-none-any.whl/ahrs/filters/fourati.py
import numpy as np from ..common.orientation import q_prod, q_conj, am2q from ..common.mathfuncs import * # Reference Observations in Munich, Germany from ..utils.wmm import WMM from ..utils.wgs84 import WGS MAG = WMM(latitude=MUNICH_LATITUDE, longitude=MUNICH_LONGITUDE, height=MUNICH_HEIGHT).magnetic_elements GRAVITY...
PypiClean
/FINE-2.2.2.tar.gz/FINE-2.2.2/docs/source/structureOfFINEDoc.rst
************************** Python package description ************************** The python package description gives a general description of the code itself. It describes the package structure (modules and classes, with their functions and variables). Contents: .. toctree:: :maxdepth: 2 sourceCodeDocumentat...
PypiClean
/HiCTornadIO2-0.1.2.tar.gz/HiCTornadIO2-0.1.2/README.rst
========= TornadIO2 ========= ---------- Disclaimer ---------- Fork of TornadIO2 0.0.4 (by Serge S. Koval). Unfortunately, Socket.IO 0.8 branch is abandoned, there are huge amount of bugs and nothing getting fixed. I would suggest to look at alternative options, for example `SockJS <http://github.com/sockjs/>`. The...
PypiClean
/gtst-0.0.5.tar.gz/gtst-0.0.5/README.ipynb
# MMDGraph ## What is this package for? This package contains code to perform kernel two-sample hypothesis testing on samples of graphs. The code additionally allows for estimation of graphs from a real data matrix. ## How to install <code> pip install GTST </code> ## Usage We will go thorugh multiple scenari...
PypiClean
/Flask_Uploader-0.2.0-py3-none-any.whl/flask_uploader/utils.py
from __future__ import annotations import hashlib import os import re import typing as t __all__ = ( 'get_extension', 'increment_path', 'md5file', 'md5stream', 'split_pairs', ) def get_extension(filename: str) -> str: """Returns the file extension.""" _, ext = os.path.splitext(filename) ...
PypiClean
/mcmc_au-1.0.0-py3-none-any.whl/MCMC_AU/Decryption.py
from .McmcFile import McmcFile from .McmcException import DecryptionException from .Sampling import Sampling import random class Decryption(McmcFile): """ La """ def __init__(self): """ Parameters ---------- __sampling : Sampling or None Un object Samp...
PypiClean
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/kdvs/fw/EnvOp.py
r""" Provides root functionality for KDVS EnvOps (environment--wide operations). IMPORTANT NOTE! In principle, EnvOp is devised as a self-contained function that can access and modify environment explicitly. Other modular execution blocks, such as techniques, reporters, orderers and selectors, by default are **isolat...
PypiClean
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/api/storage.py
import octobot_trading.storage as storage async def clear_trades_storage_history(exchange_manager, flush=True): if exchange_manager.storage_manager.trades_storage: await exchange_manager.storage_manager.trades_storage.clear_history(flush=flush) if exchange_manager.exchange_personal_data.trades_manager...
PypiClean
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/mapserver/wms/layerfactories/coverage_bands_layer_factory.py
from eoxserver.contrib.mapserver import Layer from eoxserver.services.mapserver.wms.layerfactories.base import ( AbstractLayerFactory, OffsiteColorMixIn ) class CoverageBandsLayerFactory(OffsiteColorMixIn, AbstractLayerFactory): suffixes = ("_bands",) requires_connection = True def generate(self, ...
PypiClean
/FLORIS-3.4.1.tar.gz/FLORIS-3.4.1/floris/tools/optimization/yaw_optimization/yaw_optimizer_scipy.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the Licens...
PypiClean
/Catactor-0.1.2.tar.gz/Catactor-0.1.2/shell_scripts/preprocessing/visualization_GSE123576_distal.sh
set -euxo pipefail sf_marker='GABAergic_markers_fc.txt,Glutamatergic_markers_fc.txt,Non.Neuronal_markers_fc.txt' ta_marker='tasic2016_gaba.csv,tasic2016_glu.csv,tasic2016_gli.csv' cu_marker='cusanovich2018_inh.txt,cusanovich2018_ext.txt,cusanovich2018_gli.txt' tn_marker='tasic2018_gaba.txt,tasic2018_glu.txt,tasic2018_g...
PypiClean
/EasyJappanese-0.0.2.tar.gz/EasyJappanese-0.0.2/easyjapanese/complete.py
import traceback import datetime from io import BytesIO import pandas as pd from google.cloud import storage class Complete(): """This class completes the whole process of web scraping. So far, I define the methods for obtaining the date of the retrieved easy news data and creating a dataframe from the...
PypiClean
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/config/middleware/pygrack.py
import logging import os import socket import traceback from dulwich.server import update_server_info from dulwich.web import GunzipFilter, LimitedInputFilter from webob import Request, Response, exc import kallithea from kallithea.lib.utils2 import ascii_bytes from kallithea.lib.vcs import get_repo, subprocessio l...
PypiClean
/APAC%20SCALE-0.1.2.tar.gz/APAC SCALE-0.1.2/examples/fairseq/models/language_modeling.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from dataclasses import dataclass, field from typing import Optional import torch from fairseq import distributed_utils, util...
PypiClean
/NlpToolkit-DataGenerator-1.0.7.tar.gz/NlpToolkit-DataGenerator-1.0.7/DataGenerator/DatasetGenerator/AnnotatedDatasetGenerator.py
from AnnotatedSentence.AnnotatedCorpus import AnnotatedCorpus from Classification.DataSet.DataSet import DataSet from DataGenerator.InstanceGenerator.InstanceGenerator import InstanceGenerator class AnnotatedDatasetGenerator: __corpus: AnnotatedCorpus __instance_generator: InstanceGenerator def __init_...
PypiClean
/MinutiaeClassificator-1.0.0.tar.gz/MinutiaeClassificator-1.0.0/README.md
# MinutiaeClassificator MinutiaeClassificator is a Python library for extracting and classifiying minutiae from fingerprint images. MinutiaeClassificator contains 2 modules: * **MinutiaeNet** - module responsible for extracting minutiae points from fingerprint image. Using neural network architecture from [MinutiaeN...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/grid/enhanced/nls/th/Filter.js
define( "dojox/grid/enhanced/nls/th/Filter", //begin v1.x content ({ "clearFilterDialogTitle": "ลบตัวกรอง", "filterDefDialogTitle": "ตัวกรอง", "ruleTitleTemplate": "กฏ ${0}", "conditionEqual": "เท่ากับ", "conditionNotEqual": "ไม่เท่ากับ", "conditionLess": "น้อยกว่า", "conditionLessEqual": "น้อยกว่าหรือเท่ากับ"...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/lang/az.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['az']={"editor":"Mətn Redaktoru","editorPanel":"Mətn Redaktorun Paneli","common":{"editorHelp":"Yardım üçün ALT 0 düymələrini basın","browseServer":"Fayların siy...
PypiClean
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/schema/config/server.py
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" from enum import Enum from typing import Dict, List, Optional from octoprint.schema import BaseModel from octoprint.vendor.wit...
PypiClean
/DeepPhysX-22.6.tar.gz/DeepPhysX-22.6/src/Utils/mathUtils.py
import math import numpy import torch from numpy import array, concatenate, ndarray, append, empty from numpy import cos, sin, sqrt, exp, pi, linspace from typing import Union, Iterable, Callable, List MathValue = Union[int, numpy.ndarray, float] def next_power_of_2(n: int) -> int: """ Return the next power...
PypiClean
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/file/__init__.py
import string from collections import OrderedDict from typing import Dict, Optional from .. import BaseProvider, ElementsType class Provider(BaseProvider): """Implement default file provider for Faker.""" application_mime_types: ElementsType[str] = ( "application/atom+xml", # Atom feeds "a...
PypiClean
/Flask%20of%20Cinema-1.0.0.tar.gz/Flask of Cinema-1.0.0/server_requests/films.py
import db_init from db import create_conn, update_conn from models.film import Film from models.show import Show from models.film_shows import FilmShows from sqlalchemy.sql import Select, case from sqlalchemy import and_ from datetime import date, datetime, timedelta from typing import List # Permette di inserire un ...
PypiClean
/AMLT-learn-0.2.9.tar.gz/AMLT-learn-0.2.9/amltlearn/metrics/cluster.py
__author__ = 'bejar' import numpy as np from sklearn.metrics.pairwise import euclidean_distances from sklearn.metrics.cluster.supervised import contingency_matrix, check_clusterings, mutual_info_score, entropy def maplabels(labels): """ Returns a dictionary mapping a set of labels to an index :param lab...
PypiClean
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/blog/management/commands/import_posterous.py
from __future__ import unicode_literals from datetime import datetime import json import time from optparse import make_option from django.core.management.base import CommandError from mezzanine.blog.management.base import BaseImporterCommand class Command(BaseImporterCommand): """ Import Tumblr blog posts...
PypiClean
/MagnetiCalc-1.15.2.tar.gz/MagnetiCalc-1.15.2/magneticalc/Backend_JIT.py
# ISC License # # Copyright (c) 2020–2022, Paul Wilhelm, M. Sc. <anfrage@paulwilhelm.de> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # TH...
PypiClean
/HOPYBOX-1.6.7.tar.gz/HOPYBOX-1.6.7/README.md
# HOPYBOX This is an open source, practical command python box ## Introduce This is an open source, practical command python box, since it is made in python language, so I named it **HOPYBOX**. ## Installing Install with `pip` or your favorite PyPI package manager. ```sh $ python -m pip install HOPYBOX ``` or like this...
PypiClean
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/codegen/optimisation.py
import ast import copy import itertools from collections import OrderedDict from functools import reduce from brian2.core.functions import DEFAULT_CONSTANTS, DEFAULT_FUNCTIONS from brian2.core.preferences import prefs from brian2.core.variables import AuxiliaryVariable from brian2.parsing.bast import ( BrianASTRen...
PypiClean
/DeerLab-1.1.1.tar.gz/DeerLab-1.1.1/deerlab/noiselevel.py
from numpy import isreal, std, mean, shape, atleast_1d from deerlab.utils import movmean, der_snr from deerlab.correctphase import correctphase from scipy.signal import savgol_filter import warnings def noiselevel(V,mode='der',*args): r""" Estimate the noise level in a dataset. Returns the standard devia...
PypiClean
/Ella-Galleries-1.0.2.tar.gz/Ella-Galleries-1.0.2/ella_galleries/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.datastructures import SortedDict from ella.core.models import Publishable from ella.core.cache import cache_this, CachedForeignKey from ella.core.custom_urls import resolver from ella.photos.models import Photo def...
PypiClean
/Homevee_Dev-0.0.0.0-py3-none-any.whl/Homevee/Manager/device.py
import json import os from Homevee.DeviceAPI import max_cube, zwave, philips_hue, rademacher_homepilot from Homevee.Functions.room_data import get_rooms from Homevee.Functions.sensor_data import SENSOR_TYPE_MAP from Homevee.Helper import Logger from Homevee.Item.Gateway import * from Homevee.Item.Status import * from ...
PypiClean
/NiMARE-0.2.0rc2.tar.gz/NiMARE-0.2.0rc2/nimare/annotate/utils.py
import numpy as np import pandas as pd def _generate_weights(rel_df, weights): """Create an IDxID DataFrame linking weight value to each relationship type. .. versionadded:: 0.0.2 Parameters ---------- rel_df : (X x 3) :obj:`pandas.DataFrame` DataFrame with three columns: input, output, ...
PypiClean
/Flask_Unchained-0.9.0-py3-none-any.whl/flask_unchained/bundles/sqlalchemy/hooks/register_models_hook.py
import sys from flask_unchained import AppFactoryHook, FlaskUnchained from flask_unchained.constants import TEST from typing import * from ..base_model import BaseModel from ..model_registry import UnchainedModelRegistry class RegisterModelsHook(AppFactoryHook): """ Discovers SQLAlchemy models. """ ...
PypiClean
/OctoBot_Launcher-2.0.4-py3-none-any.whl/launcher/__init__.py
from enum import Enum import flask PROJECT_NAME = "OctoBot-Launcher" OCTOBOT_BINARY = "OctoBot-Binary" OCTOBOT_NAME = "OctoBot" SHORT_VERSION = "2.0.4" PATCH_VERSION = "" # patch : pX VERSION_DEV_PHASE = "" # alpha : a / beta : b / release candidate : rc VERSION_PHASE = "" # XX VERSION = f"{SHORT_VERSION}{VERSION_...
PypiClean
/Flask-AppBuilder-redirect-2.1.13.tar.gz/Flask-AppBuilder-redirect-2.1.13/flask_appbuilder/models/sqla/__init__.py
import datetime import logging import re from flask_sqlalchemy import _QueryProperty, DefaultMeta, SQLAlchemy try: from sqlalchemy.ext.declarative import as_declarative except ImportError: from sqlalchemy.ext.declarative.api import as_declarative try: from sqlalchemy.orm.util import identity_key # noqa ...
PypiClean
/NM_LFAK-1.2.tar.gz/NM_LFAK-1.2/NM_LFAK/odu/main.py
from numpy import arange, e, sin, cos import matplotlib.pyplot as plt from pandas import DataFrame def Eiler_Koshi(functions, start, limits): ''' Входные данные: Функции - [func1, func2 ...], Нач усл - [y1, y2 ...], Границы - [left, right, step] ''' dict_of_func = {} ...
PypiClean
/HATasmota-0.7.0.tar.gz/HATasmota-0.7.0/hatasmota/sensor.py
from __future__ import annotations from dataclasses import dataclass import logging from typing import Any from .const import ( CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION, CONF_MAC, CONF_SENSOR, DEGREE, ELECTRICAL_CURRENT_AMPE...
PypiClean
/Amino_new.py-5.0.tar.gz/Amino_new.py-5.0/amino/sub_client.py
import hmac import json import base64 import requests from uuid import UUID from os import urandom from hashlib import sha1 from time import timezone from typing import BinaryIO from binascii import hexlify from time import time as timestamp from json_minify import json_minify from . import client from .lib.util impo...
PypiClean
/FeatherStore-0.2.1-py3-none-any.whl/featherstore/store.py
import os from featherstore import _utils from featherstore._utils import DB_MARKER_NAME from featherstore.table import Table, DEFAULT_PARTITION_SIZE from featherstore.connection import current_db, Connection from featherstore.snapshot import _create_snapshot def create_store(store_name, *, errors="raise"): """C...
PypiClean
/Fabric-with-working-dependencies-1.0.1.tar.gz/Fabric-with-working-dependencies-1.0.1/fabric/state.py
import os import sys from optparse import make_option from fabric.network import HostConnectionCache from fabric.version import get_version # # Win32 flag # # Impacts a handful of platform specific behaviors. Note that Cygwin's Python # is actually close enough to "real" UNIXes that it doesn't need (or want!) to # ...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/gym_hybrid/entry/gym_hybrid_ddpg_eval.py
import os import gym import torch from tensorboardX import SummaryWriter from easydict import EasyDict from functools import partial from ding.config import compile_config from ding.worker import BaseLearner, SampleSerialCollector, InteractionSerialEvaluator, AdvancedReplayBuffer from ding.envs import BaseEnvManager, ...
PypiClean
/Generic%20model%20class-0.0.3.tar.gz/Generic model class-0.0.3/MontyCarlo/tools/_CStools.py
from numpy import * #from scipy.interpolate import interpl1d #Internal Imports from .data import getAxis from .others import searchsorted #from .interpol import LinearInterpolation class TotalCrossSection: def __init__(self, upper_dir, CS): #creating new element########################################## se...
PypiClean
/MakeAboveMeme-0.5.4.tar.gz/MakeAboveMeme-0.5.4/readme.txt
**MakeAboveMeme** A command-line tool to create a meme with an image and some text above. Above that a title, below that some tags, and below them a line with "x comments, y points". Everything is optional but it looks ugly without the image. Here's an example made with version 0.2 ``python makeAboveMeme.py -T "Thes...
PypiClean
/FLiP-1.2.tar.gz/FLiP-1.2/flip/grail/README.txt
README.txt for grail This directory contains a case study inspired by the "She's a witch!" scene from Monty Python and the Holy Grail. It demonstrates the recommended way to organize a case study that uses FLiP. The case study goes into a Python package (a directory containing an __init__.py file along with the othe...
PypiClean
/Draugr-1.0.9.tar.gz/Draugr-1.0.9/draugr/torch_utilities/sessions/jit_sessions.py
__author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 10/06/2020 """ import torch from torch import jit from warg import AlsoDecorator __all__ = ["TorchJitSession", "TorchIgnoreJitSession"] class TorchIgnoreJitSession(AlsoDecorator): """ # Disable torch jit tracing""" ...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/forms/migrations/0001_initial.py
from django.db import migrations, models import mezzanine.core.fields from mezzanine.forms.fields import NAMES class Migration(migrations.Migration): dependencies = [ ("pages", "__first__"), ] operations = [ migrations.CreateModel( name="Field", fields=[ ...
PypiClean
/DeepXDE-1.9.3-py3-none-any.whl/deepxde/geometry/geometry.py
import abc from typing import Literal import numpy as np class Geometry(abc.ABC): def __init__(self, dim, bbox, diam): self.dim = dim self.bbox = bbox self.diam = min(diam, np.linalg.norm(bbox[1] - bbox[0])) self.idstr = type(self).__name__ @abc.abstractmethod def inside(...
PypiClean
/EPP-0.9.1.tar.gz/EPP-0.9.1/eppy/xmldict.py
__author__ = "Wil Tan <wil@cloudregistry.net>" from xml.etree import ElementTree from six import StringIO, iteritems, text_type, PY2, PY3 # hack: LCGCMT had the py-2.5 xml.etree module hidden by mistake. # this is to import it, by hook or by crook def import_etree(): import xml # first try the usual w...
PypiClean
/MathCake-0.0.1a3.tar.gz/MathCake-0.0.1a3/cake/matrices/matrix.py
from __future__ import annotations from cake.abc import IntegerType import typing class Matrix: """ Matrixes are an array of numbers. Example ^^^^^^^ .. code-block:: py >>> from cake import Matrix >>> x = Matrix([1, 2, 3], [1, 2, 3]) >>> x + Matrix([1, 2, 3], [1, 2, 3]) ...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/xinha/plugins/ImageManager/lang/nb.js
{ "Image Manager": "Bildebehandler", "Insert Image": "Sett inn bilde", "Directory": "Mappe", "Directory Up": "Opp en mappe", "New Folder": "Ny mappe", "Trash": "Søppelkurv", "Edit": "Rediger", "Image File": "Bildefil", "Upload": "Last opp", "Width": "Bredde", "Height": "Høyde", "Constrain Propor...
PypiClean
/Flask-TinyMCE-1.0.0.tar.gz/Flask-TinyMCE-1.0.0/flask_tinymce/static/plugins/spellchecker/plugin.min.js
!function(){"use strict";function C(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function u(e){return e.getParam("spellchecker_rpc_url")}function E(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2...
PypiClean
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/metacalls.py
import atexit from typing import Any from .binding import Binding from .environment import Environment from .handlers import HandlersHolder from .methods import Methods from .mtproto import MtProtoClient from .scaffold import Scaffold from .types import Cache from .types.call_holder import CallHolder from .types.updat...
PypiClean
/BTrees-4.11.2.tar.gz/BTrees-4.11.2/docs/overview.rst
========== Overview ========== When programming with the ZODB, Python dictionaries aren't always what you need. The most important case is where you want to store a very large mapping. When a Python dictionary is accessed in a ZODB, the whole dictionary has to be unpickled and brought into memory. If you're storin...
PypiClean
/CslBot-0.21-py3-none-any.whl/cslbot/helpers/workers.py
import multiprocessing import re import signal import threading from collections import namedtuple from datetime import datetime, timedelta import concurrent.futures from sqlalchemy import or_ from . import babble, backtrace, control from .orm import Babble_last, Log executor_lock = threading.Lock() Event = named...
PypiClean
/LumberMill-0.9.5.7-py3-none-any.whl/lumbermill/output/Udp.py
import sys import socket from lumbermill.constants import IS_PYPY from lumbermill.BaseThreadedModule import BaseThreadedModule from lumbermill.utils.Buffers import Buffer from lumbermill.utils.Decorators import ModuleDocstringParser from lumbermill.utils.DynamicValues import mapDynamicValue # For pypy the default jso...
PypiClean
/Bootcampspot-python-0.0.3.tar.gz/Bootcampspot-python-0.0.3/README.md
# BCS-Python ## Using the Wrapper ### Installation The pre-alpha release is available on [test.pypi.org](test.pypi.org/project/Bootcampspot-python/0.0.1/). It can be installed just like any other pypi package. I will migrate the release to pypi when it's closer to finished. _To install_ ``` pip install -i https://...
PypiClean
/AMLT-learn-0.2.9.tar.gz/AMLT-learn-0.2.9/amltlearn/metrics/divergences.py
__author__ = 'bejar' import numpy as np def simetrized_kullback_leibler_divergence(m1, m2): """ Simetrized Kullback-Leibler divergence between two probability matrices/vectors :param m1: :param m2: :return: """ lm1 = np.log(m1) lm2 = np.log(m2) lquot12 = np.log(m1 / m2) lquot2...
PypiClean
/Akvo-1.7.2-py3-none-any.whl/akvo/tressel/calcAkvoKernel--save.py
import os, sys import numpy as np from ruamel import yaml import pyLemma.LemmaCore as lc import pyLemma.Merlin as mrln import pyLemma.FDEM1D as em1d import numpy as np #import matplotlib.pyplot as plt #import seaborn as sns #sns.set(style="ticks") #import cmocean #from SEGPlot import * #from matplotlib.ticker i...
PypiClean
/Caroline-presentation-0.2.4.tar.gz/Caroline-presentation-0.2.4/caroline/html_dist/js/mathjax/sre/mathmaps/nemeth/symbols/greek-mathfonts.js
[{"locale":"nemeth"},{"category":"Lu","mappings":{"default":{"default":"⠄⡳⠽⠂⠙⠖⠁⠦⠄"}},"key":"1D6A8"},{"category":"Lu","mappings":{"default":{"default":"⠄⡳⠽⠂⠙⠖⠁⠔⠄"}},"key":"1D6A9"},{"category":"Lu","mappings":{"default":{"default":"⠄⡳⠽⠂⠙⠖⠁⠁⠄"}},"key":"1D6AA"},{"category":"Lu","mappings":{"default":{"default":"⠄⡳⠽⠂⠙⠖⠁⠃⠄"}...
PypiClean
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_transaction_links/post.py
from dataclasses import dataclass import typing_extensions import urllib3 from urllib3._collections import HTTPHeaderDict from firefly_iii_client import api_client, exceptions from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re...
PypiClean
/Flask_FontAwesome-0.1.5-py3-none-any.whl/flask_fontawesome/__init__.py
from flask import Flask, Blueprint, url_for, Markup, current_app FONTAWESOME_VERSION = '5.14.0' __version__ = '0.1.5' def fontawesome_html() -> Markup: ''' Returns :class:`~flask.Markup` of all the requested FontAwesome resources. This can be embedded in your Jinja templates to add FontAwesome to your si...
PypiClean
/GSLB-0.1.0.tar.gz/GSLB-0.1.0/GSL/learner/attention_learner.py
import torch import torch.nn as nn import dgl from GSL.learner import BaseLearner from GSL.metric import * from GSL.processor import * from GSL.utils import knn_fast class Attentive(nn.Module): def __init__(self, size): super(Attentive, self).__init__() self.w = nn.Parameter(torch.ones(size)) ...
PypiClean
/GelReportModels-7.8.0.tar.gz/GelReportModels-7.8.0/protocols/migration/migration_participant_112_to_participant_113.py
from protocols import participant_1_1_2 from protocols import participant_1_1_3 from protocols.migration.base_migration import BaseMigration class MigrateParticipant112To113(BaseMigration): old_model = participant_1_1_2 new_model = participant_1_1_3 def migrate_pedigree(self, old_pedigree): """ ...
PypiClean
/CNTools-0.0.0.tar.gz/CNTools-0.0.0/src/smoothing/Naive.py
import numpy as np import networkx as nx from networkx import connected_components from sklearn.metrics.pairwise import cosine_similarity from sklearn.neighbors import NearestNeighbors from copy import deepcopy def remove_small(data_image, cns_image, feats_image, s): cns_image = deepcopy(cns_image) graph = nx...
PypiClean
/MnemoPwd-1.2.1-py3-none-any.whl/mnemopwd/client/corelayer/protocol/StateS35R.py
# Copyright (c) 2016-2017, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright n...
PypiClean
/KMeansKTran-0.0.1.tar.gz/KMeansKTran-0.0.1/README.md
# KMeansKTran K-Means Clustering package to find best K using Silhouette Analysis To run the script, use **run_KMeans()** method. Arguments for **run_KMeans(filenames, output)** **filenames**: list >List of strings to designate text filenames or file locations with filenames > >Example: ["C:\\Folder\\File1.txt"] ...
PypiClean
/Lvt-Evaluation-0.1.0.tar.gz/Lvt-Evaluation-0.1.0/lvt_eval/tools/customcocoeval.py
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict from pycocotools.cocoeval import COCOeval from pycocotools import mask as maskUtils import copy import logging logging.basicConfig(format='%(asctime)s [%(pathname)s:%(lineno)d] %(message)s', ...
PypiClean
/Mini-AMF-0.9.1.tar.gz/Mini-AMF-0.9.1/CHANGES.rst
Changelog ========= This document contains a detailed log of the history of Mini-AMF. 0.9.1 (2017-03-07) ------------------ - Corrections to the documentation and the way the documentation is built. - No code changes from 0.9.0. 0.9.0 (2017-03-07) ------------------ - First release as Mini-AMF. - Supports Python ...
PypiClean
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/library/power_turboshaft.py
import aerosandbox.numpy as np def overall_pressure_ratio_turboshaft_technology_limit( mass_turboshaft: float ) -> float: """ Estimates the maximum-practically-achievable overall pressure ratio (OPR) of a turboshaft engine, as a function of its mass. A regression to historical data. Based on ...
PypiClean
/LZBEAT-0.13.1.tar.gz/LZBEAT-0.13.1/econml/metalearners/_metalearners.py
import numpy as np import warnings from .._cate_estimator import BaseCateEstimator, LinearCateEstimator, TreatmentExpansionMixin from sklearn import clone from sklearn.linear_model import LogisticRegression from sklearn.pipeline import Pipeline from sklearn.utils import check_array, check_X_y from sklearn.preprocessing...
PypiClean
/Mantissa-0.9.0.tar.gz/Mantissa-0.9.0/xmantissa/webadmin.py
import random, string from zope.interface import implements from twisted.python.components import registerAdapter from twisted.python.util import sibpath from twisted.python.filepath import FilePath from twisted.python import log from twisted.application.service import IService, Service from twisted.conch import man...
PypiClean
/BlazeWeb-0.6.2-py3-none-any.whl/blazeweb/tasks.py
from __future__ import print_function from decorator import decorator from blazeutils import tolist, OrderedDict import logging import six from blazeweb.globals import ag from blazeweb.hierarchy import gatherobjs log = logging.getLogger(__name__) def _attributes(f, *args, **kwargs): """ does the work of...
PypiClean
/BabitMF_GPU-0.0.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/bmf/hml/hmp/tracer.py
import bmf.hml.hmp as mp def singleton(class_): instances = {} def getinstance(*args, **kwargs): if class_ not in instances: instances[class_] = class_(*args, **kwargs) return instances[class_] return getinstance def get_device_type(device): device = str(device).lower()...
PypiClean
/HTS-waterworks-0.1.tar.gz/HTS-waterworks-0.1/hts_waterworks/motif_discovery.py
import shlex import glob import re import pickle import random from array import array from collections import defaultdict import math from pygr import worldbase import numpy from matplotlib import pyplot import matplotlib from ruffus import (transform, suffix, files, follows, regex, split, collate, ...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/ui/grid_layout.py
from warnings import warn try: from cStringIO import StringIO except ImportError, e: from StringIO import StringIO from muntjac.ui.alignment import Alignment from muntjac.ui.abstract_layout import AbstractLayout from muntjac.ui.layout import IAlignmentHandler, ISpacingHandler from muntjac.ui.alignment_utils i...
PypiClean
/Chula-0.13.3.tar.gz/Chula-0.13.3/docs/library/www/adapters/env.rst
:mod:`chula.www.adapters.env` -- HTTP environment ================================================= .. index:: single: env pair: base; env .. automodule:: chula.www.adapters.env .. autoclass:: chula.www.adapters.env.BaseEnv :members: .. attribute:: CONTENT_LENGTH Document length. .. attribute...
PypiClean
/ClipCap-1.0.0-py3-none-any.whl/clipcap/train/dataloader.py
from torch.utils.data import IterableDataset, DataLoader from embedding_reader import EmbeddingReader from argparse import ArgumentParser from typing import Tuple, Iterable import torch from clipcap.model import get_tokenizer class EmbedDataset(IterableDataset): """ Streams preprocessed embeddings with the E...
PypiClean
/Choco-1.0.5.tar.gz/Choco-1.0.5/test/__init__.py
from choco.template import Template import unittest import os from choco.compat import py3k, py26, py33 from choco import compat from choco.util import update_wrapper import re from choco.cache import CacheImpl, register_plugin try: # unitttest has a SkipTest also but pytest doesn't # honor it unless nose is i...
PypiClean