id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/KratosParticleMechanicsApplication-9.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/ParticleMechanicsApplication/assign_gravity_to_particle_process.py | import KratosMultiphysics
import KratosMultiphysics.ParticleMechanicsApplication as KratosParticle
def Factory(settings, Model):
if(not isinstance(settings, KratosMultiphysics.Parameters)):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return AssignGravityT... | PypiClean |
/NEMO_CE-1.6.12-py3-none-any.whl/NEMO/migrations/0040_version_4_2_0.py |
from django.db import migrations, models
import NEMO.utilities
from NEMO.migrations_utils import create_news_for_version
class Migration(migrations.Migration):
dependencies = [
('NEMO', '0039_version_4_1_0'),
]
def new_version_news(apps, schema_editor):
create_news_for_version(apps, "4... | PypiClean |
/CoreMS-1.6.0.tar.gz/CoreMS-1.6.0/corems/molecular_id/input/nistMSI.py | __author__ = "Yuri E. Corilo"
__date__ = "Feb 12, 2020"
from threading import Thread
from pathlib import Path
from corems.molecular_id.factory.EI_SQL import EI_LowRes_SQLite
class ReadNistMSI(Thread):
def __init__(self, file_path, url='sqlite://'):
Thread.__init__(self)
file_path = Path... | PypiClean |
/ICUSIM-0.2.0.tar.gz/ICUSIM-0.2.0/icusim/params.py | def params(initial_patient_count=120,
days_to_simulate=50,
total_capacity_min=200,
total_capacity_max=1000,
ventilated_icu_share_min=.4,
ventilated_icu_share_max=.7,
standard_cfr_min=.2,
standard_cfr_max=.6,
ventilated_cfr_min=1.3,
... | PypiClean |
/CLAM-3.2.6.tar.gz/CLAM-3.2.6/clam/static/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=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;n<e.length;n... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/db/models/indexes.py | from django.db.backends.utils import names_digest, split_identifier
from django.db.models.query_utils import Q
from django.db.models.sql import Query
__all__ = ['Index']
class Index:
suffix = 'idx'
# The max length of the name of the index (restricted to 30 for
# cross-database compatibility with Oracle)... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/chats/set_chat_permissions.py |
from typing import Union
import pyrogram
from pyrogram import raw
from pyrogram import types
class SetChatPermissions:
async def set_chat_permissions(
self: "pyrogram.Client",
chat_id: Union[int, str],
permissions: "types.ChatPermissions",
) -> "types.Chat":
"""Set default ch... | PypiClean |
/MAVR-0.93.tar.gz/MAVR-0.93/scripts/entrez/get_taxa_genomes_summary.py | __author__ = 'Sergei F. Kliver'
import argparse
from RouToolPa.Routines import NCBIRoutines
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--taxa", action="store", dest="taxa", required=True,
type=lambda s: s.split(","),
help="Comma-separated list of taxon names... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Liver/FC/Environment/utils.py | import math
import vedo
import os
os.environ['OPENBLAS_NUM_THREADS'] = '1'
os.environ['MKL_NUM_THREADS'] = '1'
import numpy as np
def compute_grid_resolution(max_bbox, min_bbox, cell_size):
"""
Compute the grid resolution from the desired cell size and the grid dimensions.
:param max_bbox: Max upper corn... | PypiClean |
/AbPyTools-0.3.2.tar.gz/AbPyTools-0.3.2/README.md | AbPyTools
=========
[](https://coveralls.io/github/gf712/AbPyTools?branch=master)
[](https://travis-ci.org/gf712/AbPyTools)
[
* perception hashing (`pHash`_)
* difference hashing (`dHash`_)
* caching resized images
Requirements
-------------
Based on PIL/Pillow Image, numpy and scipy.fftpack (for pHash)
Easy installat... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/lang/fi.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['fi']={"editor":"Rikastekstieditori","editorPanel":"Rikastekstieditoripaneeli","common":{"editorHelp":"Paina ALT 0 nähdäksesi ohjeen","browseServer":"Selaa palve... | PypiClean |
/Beautifly_B-0.1.6.1.tar.gz/Beautifly_B-0.1.6.1/Beautifly_B/BrushingDataframe-Development.py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from sklearn import preprocessing
import holoviews as hv; hv.extension('bokeh', 'matplotlib')
import pandas as pd
from datetime import date
from sklearn.model_selection import StratifiedKFold
from sklea... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Util.py |
__revision__ = "src/engine/SCons/Util.py 2014/07/05 09:42:21 garyo"
import os
import sys
import copy
import re
import types
from collections import UserDict, UserList, UserString
# Don't "from types import ..." these because we need to get at the
# types module later to look for UnicodeType.
InstanceType = type... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/inference/displacenet_vs_sole_classifier.py | from __future__ import print_function
from engine.displaced_people_branch.single_image_inference_hra_2class import single_img_HRA_inference
from keras.preprocessing import image
from scipy.misc import imread
from matplotlib import pyplot as plt
from inference.displacenet_single_image_inference_unified import displac... | PypiClean |
/DrQueueIPython-0.0.1.tar.gz/DrQueueIPython-0.0.1/DrQueue/computer_pool.py | import os
import getpass
class Callable:
def __init__(self, anycallable):
self.__call__ = anycallable
class ComputerPool(dict):
"""Subclass of dict for collecting Pool attribute values."""
def __init__(self, name, engine_names=[]):
dict.__init__(self)
if type(engine_names).__nam... | PypiClean |
/HzCheck_Mucci-0.0.0.tar.gz/HzCheck_Mucci-0.0.0/README.md | # HzCheck
HzCheck is a Python library that provides various tools for retrieving information about a network and its devices. It was created to help people get network information using Python.
I started this project just a week ago, and I've already added a bunch of useful functions that allow you to get informatio... | PypiClean |
/1d3-sdk-1.0.3.tar.gz/1d3-sdk-1.0.3/payment_page_sdk/signature_handler.py | import base64
import hmac
from collections import OrderedDict
class SignatureHandler(object):
"""Class SignatureHandler
Attributes:
ITEMS_DELIMITER - signature concatenation delimiter
IGNORE_KEYS - ignore keys in signature
__secretKey - Secret key
"""
ITEMS_DELIMITER = ';'
... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA-AI-1.1/DLTA_AI_app/mmdetection/configs/_base_/models/mask_rcnn_r50_caffe_c4.py | norm_cfg = dict(type='BN', requires_grad=False)
model = dict(
type='MaskRCNN',
backbone=dict(
type='ResNet',
depth=50,
num_stages=3,
strides=(1, 2, 2),
dilations=(1, 1, 1),
out_indices=(2, ),
frozen_stages=1,
norm_cfg=norm_cfg,
norm_eval=Tr... | PypiClean |
/BxGraph-0.4.1.tar.gz/BxGraph-0.4.1/bxgraph/backend/numpy.py |
import functools
import numpy as np
import scipy.sparse as sp
import scipy.sparse.csgraph as gs
from .base import BaseGraph
from ..algorithms import stats, func
from ..algorithms import generate
class Graph(BaseGraph):
"""
The graph class represents undirected graphs, optionally with node features and labels.... | PypiClean |
/FireDM-2022.4.14.tar.gz/FireDM-2022.4.14/firedm/themes.py | import awesometkinter as atk
# main colors
MAIN_BG = "#1c1c21"
MAIN_FG = "white"
# side frame colors
SF_BG = "#000300"
SF_FG = "white"
SF_BTN_BG = "#d9dc4b"
SF_CHKMARK = "#d9dc4b"
THUMBNAIL_BG = "#000300" # color of thumbnail frame in Home
THUMBNAIL_FG = "#d9dc4b" # color of base thumbnail photo
THUMBNAIL_BD = "#d... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/webcomponentsjs/webcomponents-lite.min.js | !function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents-lite.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,o=e.split("=");o[0]&&(t=o[0].match(/wc-(.+)/))&&(n[t[1]]=o[1]||!0)}),t)for(var o,r=0;o=t.at... | PypiClean |
/LoggingToolkit-0.3.tar.gz/LoggingToolkit-0.3/src/LoggingToolKit/LoggingToolKit.py | import logging
import os
import time
class Logging():
def __init__(self, instance_name, log_file_location=''):
self.logger = logging.getLogger(instance_name)
self.instance_name = instance_name
self.log_file_location = log_file_location
if '.py' in log_file_location:
self... | PypiClean |
/CAMELS_library-0.3.tar.gz/CAMELS_library-0.3/scripts/images_EX/create_images_EX.py | import numpy as np
import sys,os,h5py
import MAS_library as MASL
sys.path.append('../analysis')
import camel_library as CL
import torch
import torchvision.utils as vutils
#################################### INPUT ##########################################
root_in = '/mnt/ceph/users/camels'
root_out = '/mnt... | PypiClean |
/FanFicFare-4.27.0.tar.gz/FanFicFare-4.27.0/fanficfare/adapters/adapter_mediaminerorg.py |
# Copyright 2011 Fanficdownloader team, 2018 FanFicFare team
#
# 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 applica... | PypiClean |
/CellProfiler-4.2.6.tar.gz/CellProfiler-4.2.6/cellprofiler/modules/expandorshrinkobjects.py | from cellprofiler_core.module import Module
from cellprofiler_core.setting import Binary
from cellprofiler_core.setting.choice import Choice
from cellprofiler_core.setting.subscriber import LabelSubscriber
from cellprofiler_core.setting.text import LabelName, Integer
from cellprofiler_core.setting import Measurement
fr... | PypiClean |
/Bookbank-0.0.1.tar.gz/Bookbank-0.0.1/bookbank/core.py | import os
import flask.ext.restless
import flask.ext.bcrypt
import flask.ext.httpauth
import flask.ext.security
from flask.ext.security.utils import encrypt_password, verify_password
import flask_jwt
from bookbank import BBCONF_PATH_LIBBASE
from .app import app
from .database import db
flask_bcrypt = flask.ext.bcryp... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/controller/controllers/SLMController.py | import json
import os
import numpy as np
from imswitch.imcommon.model import dirtools, initLogger
from imswitch.imcontrol.model.managers.SLMManager import MaskMode, Direction
from ..basecontrollers import ImConWidgetController
class SLMController(ImConWidgetController):
"""Linked to SLMWidget."""
def __ini... | PypiClean |
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/personal_data/positions/channel/positions_updater.py | import asyncio
import octobot_commons.async_job as async_job
import octobot_trading.errors as errors
import octobot_trading.enums as enums
import octobot_trading.personal_data.positions.channel.positions as positions_channel
import octobot_trading.constants as constants
import octobot_trading.exchange_channel as exch... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/boston.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def boston(path):
"""Housing Values in Suburbs of Boston
The `Boston` data frame has 506 rows ... | PypiClean |
/BuildSimHubAPI-2.0.0-py3-none-any.whl/buildsimlearn/draw_tree.py | import BuildSimHubAPI as bsh_api
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor
from sklearn.tree import export_graphviz
import pydot
"""
USER INPUT
"""
project_api_key = 'f98aadb3-254f-428d-a321-82a6e4b9424c'
model_api_key... | PypiClean |
/FireDM-2022.4.14.tar.gz/FireDM-2022.4.14/firedm/FireDM.py | # standard modules
import os
import subprocess
import sys
import argparse
import re
import signal
# This code should stay on top to handle relative imports in case of direct call of FireDM.py
if __package__ is None:
path = os.path.realpath(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(path))
... | PypiClean |
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py | from torch import nn
from PMTD.maskrcnn_benchmark.structures.image_list import to_image_list
from ..backbone import build_backbone
from ..rpn.rpn import build_rpn
from ..roi_heads.roi_heads import build_roi_heads
class GeneralizedRCNN(nn.Module):
"""
Main class for Generalized R-CNN. Currently supports boxe... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/machinery/microsoftterminology.py |
from django.utils.functional import cached_property
from weblate_language_data.countries import DEFAULT_LANGS
from zeep import Client
from weblate.machinery.base import MachineTranslation
MST_API_URL = "http://api.terminology.microsoft.com/Terminology.svc"
MST_WSDL_URL = f"{MST_API_URL}?wsdl"
class MicrosoftTermin... | PypiClean |
/Kr0nOs_Bot-3.3.11-py3-none-any.whl/redbot/cogs/audio/audio_dataclasses.py | import contextlib
import glob
import logging
import ntpath
import os
import posixpath
import re
from pathlib import Path, PosixPath, WindowsPath
from typing import (
AsyncIterator,
Final,
Iterator,
MutableMapping,
Optional,
Tuple,
Union,
Callable,
Pattern,
)
from urllib.parse import ... | PypiClean |
/NKDemo-0.0.0.tar.gz/NKDemo-0.0.0/orangedemo/OWLearningCurveB.py | from collections import OrderedDict
from functools import reduce
import numpy
from AnyQt.QtWidgets import QTableWidget, QTableWidgetItem
import Orange.data
import Orange.classification
import Orange.evaluation
from Orange.widgets import gui, settings
from Orange.widgets.utils.widgetpreview import WidgetPreview
from... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/plot2d/Base.js.uncompressed.js | define("dojox/charting/plot2d/Base", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect",
"../Element", "./_PlotEvents", "dojo/_base/array",
"../scaler/primitive", "./common", "dojox/gfx/fx"],
function(lang, declare, hub, Element, PlotEvents, arr, primitive, common, fx){
/*=====
var Element = dojox.cha... | PypiClean |
/DE_Parametros-0.0.16.2.tar.gz/DE_Parametros-0.0.16.2/parametros_OLD.py | import datetime as dt
import DE_DataBase as D
import pandas as pd
import json
import inspect
class PARAMETERS:
NAME_CLASS = inspect.stack()[0].function
def __init__(self, **kwargs):
try:
function_name = inspect.stack()[0].function
db = D.DATABASE()
self._cnn = db.... | PypiClean |
/Bubot_AuthService-0.0.8-py3-none-any.whl/BubotObj/OcfDevice/subtype/AuthService/AuthServiceApi.py |
from Bubot.Helpers.ActionDecorator import async_action
from Bubot.Core.ObjApi import DeviceApi
# from bubot.Catalog.Account.Account import Account
class AuthServiceApi(DeviceApi):
@async_action
async def public_api_read_auth_methods(self, view, **kwargs):
result = {
'Auth': {
... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/moment/locale/nl-be.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 |
/NetLSD-1.0.2.tar.gz/NetLSD-1.0.2/netlsd/util.py | import numpy as np
import scipy.linalg as spl
import scipy.sparse as sps
import scipy.sparse.linalg as spsl
def check_1d(inp):
"""
Check input to be a vector. Converts lists to np.ndarray.
Parameters
----------
inp : obj
Input vector
Returns
-------
numpy.ndarray or None
... | PypiClean |
/chatglm6bpkg-0.0.1.tar.gz/chatglm6bpkg-0.0.1/cli_demo.py | import os
import platform
import signal
from transformers import AutoTokenizer, AutoModel
import readline
cli_demo_model, cli_demo_tokenizer = None, None
os_name = platform.system()
clear_command = 'cls' if os_name == 'Windows' else 'clear'
stop_stream = False
def build_prompt(history):
prompt = "欢迎使用 ChatGLM-6... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/TeX/Typewriter/Regular/Other.js | MathJax.Hub.Insert(MathJax.OutputJax.SVG.FONTDATA.FONTS.MathJax_Typewriter,{305:[432,-1,525,72,462,"411 76Q441 76 451 69T462 38Q462 29 462 26T460 18T453 9T440 1H94Q72 8 72 33V38Q72 46 72 49T74 58T81 68T94 76H233V355H167L102 356Q80 363 80 393Q80 418 91 425T138 432Q145 432 165 432T200 431H295Q297 429 303 425T310 420T314 ... | PypiClean |
/3D-registration-0.4.3.tar.gz/3D-registration-0.4.3/src/IO/spatial_image.py | __license__ = "Cecill-C"
__revision__ = " $Id: $ "
import numpy as np
from scipy import ndimage
import copy as cp
# -- deprecation messages --
# import warnings, exceptions
# msg = "SpatialImage.resolution is deprecated, use SpatialImage.voxelsize"
# rezexc = exceptions.PendingDeprecationWarning(msg)
class SpatialI... | PypiClean |
/Flask-COMBO-JSONAPI-1.1.0.tar.gz/Flask-COMBO-JSONAPI-1.1.0/flask_combo_jsonapi/schema.py | from collections import OrderedDict
from marshmallow import class_registry
from marshmallow.base import SchemaABC
from marshmallow_jsonapi.fields import Relationship, List, Nested
from flask_combo_jsonapi.exceptions import InvalidInclude
from flask_combo_jsonapi.utils import SPLIT_REL
def compute_schema(schema_cls,... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/localflavor/hr/hr_choices.py | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
HR_COUNTY_CHOICES = (
('GZG', _('Grad Zagreb')),
('BBŽ', _('Bjelovarsko-bilogorska županija')),
('BPŽ', _('Brodsko-posavska županija')),
('DNŽ', _('Dubrovačko-neretvanska županija')),
('IŽ', _('Istarska... | PypiClean |
/GaussBinom_distributions_HD-1.0.tar.gz/GaussBinom_distributions_HD-1.0/GaussBinom_distributions_HD/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 |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/docs/reference_MeasAPI.md | # MeasAPI
::: LabExT.Measurements.MeasAPI.Measurement.Measurement
selection:
members:
- get_default_parameter
- get_wanted_instrument
- algorithm
- get_instrument
- setup_return_dict
- _check_data
- init_instruments
... | PypiClean |
/BuildSimHubAPI-2.0.0-py3-none-any.whl/buildsimdata/feature_selector.py | import pandas as pd
import numpy as np
# utility for early stopping with a validation set
from sklearn.model_selection import train_test_split
# visualizations
import matplotlib.pyplot as plt
import seaborn as sns
# memory management
import gc
# utilities
from itertools import chain
class FeatureSelector():
"""... | PypiClean |
/AuthBWC-0.3.3-py3-none-any.whl/authbwc/forms.py | from blazeform.exceptions import ValueInvalid
from blazeutils.helpers import tolist, toset
from blazeweb.globals import user
from formencode.validators import MaxLength
import sqlalchemy as sa
import six
from compstack.auth.helpers import validate_password_complexity, note_password_complexity
from compstack.auth.model... | PypiClean |
/Lasco-0.1.0.tar.gz/Lasco-0.1.0/lasco/models.py |
from cryptacular.bcrypt import BCRYPTPasswordManager
from sqlalchemy import create_engine
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import String
from sqlalchemy import Table
from sqlal... | PypiClean |
/Auto-Research-1.0.tar.gz/Auto-Research-1.0/src/arxiv_public_data/internal_citations.py | import time
import re
import sys
import glob
import os
import gzip
import json
import math
from multiprocessing import Pool,cpu_count
from arxiv_public_data.regex_arxiv import REGEX_ARXIV_FLEXIBLE, clean
from arxiv_public_data.config import DIR_FULLTEXT, DIR_OUTPUT, LOGGER
log = LOGGER.getChild('fulltext')
RE_FLEX = ... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/types/inline_mode/inline_query_result_cached_photo.py |
from typing import Optional, List
import fipper
from fipper import raw, types, utils, enums
from .inline_query_result import InlineQueryResult
from ...file_id import FileId
class InlineQueryResultCachedPhoto(InlineQueryResult):
"""A link to a photo stored on the Telegram servers.
By default, this photo wil... | PypiClean |
/Flask-SuperAdmin-1.7.1.tar.gz/Flask-SuperAdmin-1.7.1/flask_superadmin/base.py | import re
from functools import wraps
from flask import Blueprint, render_template, url_for, abort
from flask_superadmin import babel
def expose(url='/', methods=('GET',)):
"""
Use this decorator to expose views in your view classes.
`url`
Relative URL for the view
`methods... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/typescript/lib/lib.es2018.intl.d.ts |
declare namespace Intl {
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
type PluralRuleType = "cardinal" | "ordinal";
interface PluralRulesOptions {
localeMatcher?: "lookup" | ... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/distutils.ext/obidistutils/serenity/pip/_vendor/html5lib/treebuilders/dom.py | from __future__ import absolute_import, division, unicode_literals
from xml.dom import minidom, Node
import weakref
from . import _base
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
def getDomBuilder(DomImplementation):
Dom = DomImplementation
class A... | PypiClean |
/ChemDataExtractor_c-1.0.0-py3-none-any.whl/chemdataextractor/scrape/entity.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import Sequence
import json
import logging
import six
from .base import BaseEntity, EntityMeta
from .fields import StringField, DateTimeField, UrlField
... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/webencodings/labels.py |
LABELS = {
'unicode-1-1-utf-8': 'utf-8',
'utf-8': 'utf-8',
'utf8': 'utf-8',
'866': 'ibm866',
'cp866': 'ibm866',
'csibm866': 'ibm866',
'ibm866': 'ibm866',
'csisolatin2': 'iso-8859-2',
'iso-88... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/qdarkstyle/qtpy_style_rc.py |
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.6.2)
#
# WARNING! All changes made in this file will be lost!
from qtpy import QtCore
qt_resource_data = b"\
\x00\x00\x17\x1d\
\x00\
\x00\xa6\xa5\x78\x9c\xdd\x3d\x6d\x73\xdb\x36\xd2\xdf\xfd\x2b\x90\
\xf8\x8b\xd3\xc7\x8a\x2d\xc9\x76\x13\x75... | PypiClean |
/Clor-0.4.0.tar.gz/Clor-0.4.0/README.rst | .. image:: https://img.shields.io/pypi/l/Clor.svg
:target: https://spdx.org/licenses/LGPL-2.1+.html
:alt: PyPI - License
.. image:: https://heptapod.host/saajns/clor/badges/branch/default/pipeline.svg
:target: https://heptapod.host/saajns/clor/-/commits/branch/default
:alt: Pipeline status
.. image:: https:... | PypiClean |
/CLAM-3.2.6.tar.gz/CLAM-3.2.6/clam/static/jquery.fineuploader-3.1.min.js | var qq=function(a){return{hide:function(){a.style.display="none";return this},attach:function(b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c);return function(){qq(a).detach(b,c)}},detach:function(b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.attachEvent&&a.detachEv... | PypiClean |
/ERPpeek-1.7.1.tar.gz/ERPpeek-1.7.1/docs/api.rst | ===========
ERPpeek API
===========
.. module:: erppeek
The library provides few objects to access the OpenObject model and the
associated services of `the Odoo API`_.
The signature of the methods mimics the standard methods provided by the
:class:`osv.Model` Odoo class. This is intended to help the developer when
... | PypiClean |
/MGLEX-0.2.1.tar.gz/MGLEX-0.2.1/mglex/common.py |
u"""
This file contains helper functions and types.
"""
__author__ = "code@fungs.de"
from . import types
import numpy as np
import math
from numpy.testing import assert_approx_equal
from scipy.special import binom
from operator import itemgetter
from itertools import count, filterfalse, chain
from collections import... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/doc/sphinx/source/attributes/family.rst | family
======
An integer value corresponding to the family of the :doc:`taxid <./taxid>` stored into the
:doc:`taxid <taxid>` attribute. If the family is not defined for this :doc:`taxid <./taxid>`,
this value is *None*.
.. warning:: This taxonomic information is just added to the sequence for the ... | PypiClean |
/LifeGame-1.0.3.tar.gz/LifeGame-1.0.3/GameofLife/LifeGame.py | import sys
import time
import pygame
import random
from datetime import datetime
class LifeGame:
def __init__(self, screen_width=840, screen_height=600, cell_size=10, alive_color=(0, 255, 255), dead_color=(0, 0, 0), max_fps=7):
"""
Initialize grid, set default game state, initialize screen
... | PypiClean |
/ActiveReign-1.0.5.tar.gz/ActiveReign-1.0.5/ar3/ops/enum/file_parser/parse_regex.py | from re import findall
def parse_data(contents, regex, max_chars, filename):
# Get file data
line_count = 1
# Splitlines and look for regex matches
for line in contents.splitlines():
if line:
# Parse line for sensitive information
search_data = regex_search(regex, max_ch... | PypiClean |
/CellConstructor-1.3.2.tar.gz/CellConstructor-1.3.2/README.md | # CellConstructor
Welcome to the CellConstructor python package!
## What is CellConstructor?
CellConstructor is a python library that allows to easily manipulate crystal structures and phonon dynamical matrices.
It is based on quantum espresso, and wraps in python many of the utilities available in the PHonon package... | PypiClean |
/Mopidy-Mopify-1.7.3.tar.gz/Mopidy-Mopify-1.7.3/mopidy_mopify/static/debug/src/vendor/angular-sanitize/angular-sanitize.js | (function(window, angular) {'use strict';
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Any commits to this file should be reviewed with security in mind. *
* Changes to this file can potentially create security vulnerabilities. *
* An approval from 2 Core members wi... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/readable-stream/lib/_stream_duplex.js |
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
'use strict';
/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
var keys = [... | PypiClean |
/2captcha-python-1.2.1.tar.gz/2captcha-python-1.2.1/twocaptcha/api.py |
import requests
class NetworkException(Exception):
pass
class ApiException(Exception):
pass
class ApiClient():
def __init__(self, post_url = '2captcha.com'):
self.post_url = post_url
def in_(self, files={}, **kwargs):
'''
sends POST-request (file... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/plugins/standard/DllFilesPlugin.py | import os
import sys
from nuitka.Options import isStandaloneMode
from nuitka.plugins.PluginBase import NuitkaPluginBase
from nuitka.PythonVersions import python_version
from nuitka.utils.FileOperations import (
listDllFilesFromDirectory,
listExeFilesFromDirectory,
)
from nuitka.utils.SharedLibraries import get... | PypiClean |
/MSCTOOLS-0.0.12.tar.gz/MSCTOOLS-0.0.12/msctools/tools.py |
import os
import sys
import cv2
import numpy as np
import xml.etree.ElementTree as ET
def sayhi():
print('hello world')
def parse_rec(filename, Price=False):
""" Parse a PASCAL VOC xml file """
tree = ET.parse(filename)
objects = []
for obj in tree.findall('object'):
obj_struct = {}
... | PypiClean |
/Instrumental-lib-0.7.zip/Instrumental-lib-0.7/docs/cameras-picam.rst | Picam Cameras
=============
.. toctree::
Installation
------------
This module requires the Picam SDK and the `NiceLib` package. Tested to work on Windows and Linux.
On Linux, you must set the ``GENICAM_ROOT_V2_4`` environment variable to the path to genicam (probably ``/opt/pleora/ebus_sdk/x86_64/lib/genicam``) an... | PypiClean |
/CellDetection-0.4.3-py3-none-any.whl/celldetection/data/datasets/bbbc041.py | from torchvision.datasets import utils
from os.path import join, basename, isfile
from os import makedirs, listdir
from imageio import imread
import numpy as np
import json
from matplotlib import pyplot as plt
import shutil
from ...visualization.images import plot_box, plot_text
__all__ = ['download_bbbc041', 'BBBC041... | PypiClean |
/Filezen-1.5.3.tar.gz/Filezen-1.5.3/filezen/simpleScanner/simplescanner.py | import os
import json
from filezen.simpleScanner.extensionMapper import extensionsToFolder
from filezen.scanner import scanner
class SimpleScanner(scanner.Scanner):
"""
This class moves the input files
using a predefined mapping. Inherits
some methods from Scanner.
"""
def __init__(self):
... | PypiClean |
/KD_Lib-0.0.32.tar.gz/KD_Lib-0.0.32/KD_Lib/KD/vision/KA/PS.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from KD_Lib.KD.common import BaseClass
class ProbShift(BaseClass):
"""
Implementation of the knowledge adjustment technique from the paper
"Preparing Lessons: Improve Knowledge Distillation with Better Supervision"
https://arxiv.org/a... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/backends/base/creation.py | import os
import sys
from io import StringIO
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.db import router
from django.db.transaction import atomic
from django.utils.module_loading import import_string
# The prefix to put on the default database name wh... | PypiClean |
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/utility/terminal.py |
##############################################################################
## DendroPy Phylogenetic Computing Library.
##
## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder.
## All rights reserved.
##
## See "LICENSE.rst" for terms and conditions of usage.
##
## If you use this work or any portion there... | PypiClean |
/MongoLite-1.5.tar.gz/MongoLite-1.5/mongolite/collection.py |
from pymongo.collection import Collection as PymongoCollection
from cursor import Cursor
class Collection(PymongoCollection):
def __init__(self, *args, **kwargs):
self._documents = {}
self._collections = {}
super(Collection, self).__init__(*args, **kwargs)
self._registered_documen... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/utils/holomorphic.py |
from typing import Callable, Optional
from functools import partial
import jax
import jax.numpy as jnp
from netket import jax as nkjax
from netket.utils.types import Array, PyTree
@partial(jax.jit, static_argnames=("apply_fun"))
def is_probably_holomorphic(
apply_fun: Callable[[PyTree, Array], Array],
para... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/forms/widgets.py | from __future__ import absolute_import, unicode_literals
import copy
import datetime
from itertools import chain
try:
from urllib.parse import urljoin
except ImportError: # Python 2
from urlparse import urljoin
from django.conf import settings
from django.forms.util import flatatt, to_current_timezone
fro... | PypiClean |
/MailApi-0.1.8.tar.gz/MailApi-0.1.8/README.md | # iRedAdmin API
A programmer friendly interface for iRedAdmin (OSE version)
# Known Limitations
- Only supports MD5 passwords
- Only supports MySQL
# Getting Started
1. `$ virtualenv -p $(which python2.7) venv`
2. `$ source venv/bin/activate`
3. `(venv)$ python setup.py develop`
# Usage
Before you can start mak... | PypiClean |
/BenchExec-3.17.tar.gz/BenchExec-3.17/benchexec/tools/tracerx.py |
import benchexec.result as result
import benchexec.tools.template
import benchexec.model
from benchexec.tools.sv_benchmarks_util import get_data_model_from_task, ILP32, LP64
class Tool(benchexec.tools.template.BaseTool2):
"""
Tool info for Tracer-X (https://www.comp.nus.edu.sg/~tracerx/).
"""
def ex... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megenginelite/_env_initlization.py |
import ctypes
import glob
import logging
import os
import sys
from ctypes import *
def check_pip_env():
filter_package_name = 'megbrain'
need_package_name = 'megengine'
import pkg_resources
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(["%s" % i.key.lower() for... | PypiClean |
/BenchML-0.3.4.tar.gz/BenchML-0.3.4/benchml/models/common.py | import numpy as np
import benchml.transforms as btf
from benchml.hyper import GridHyper, Hyper
def get_logd_hybrid_topo_gp_kwargs():
return dict(
transforms=[
btf.ExtXyzInput(tag="input"),
btf.CxCalcTransform(
tag="cx", args={"reshape_as_matrix": True}, inputs={"co... | PypiClean |
/Gnosis-0.1.1.tar.gz/Gnosis-0.1.1/gnosis/xml/pickle/_pickle.py | from gnosis.xml.pickle.util import \
_klass, _module, _EmptyClass, \
safe_string, safe_content,\
get_class_from_stack, get_class_full_search, \
get_class_from_store, get_class_from_vapor, \
getParanoia, getDeepCopy, get_function_info, \
getParser, getInBody, setInBody, getVerbose, enumPars... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/engine/object_detection_branch/retina_net/keras_retinanet/bin/debug.py | import argparse
import numpy as np
import os
import sys
import cv2
# Allow relative imports when being executed as script.
if __name__ == "__main__" and __package__ is None:
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
import keras_retinanet.bin # noqa: F401
__package__ = "kera... | PypiClean |
/BlueWhale3_Text-1.6.0-py3-none-any.whl/orangecontrib/text/widgets/owcorpustonetwork.py | from typing import Tuple, Any
from AnyQt.QtWidgets import QLayout
from AnyQt.QtCore import QSize
from Orange.widgets.widget import OWWidget, Input, Output, Msg
from Orange.widgets.settings import Setting
from Orange.widgets.gui import widgetBox, comboBox, spin, button
from Orange.widgets.utils.concurrent import Concur... | PypiClean |
/dipex-4.54.5.tar.gz/dipex-4.54.5/integrations/aarhus/util.py | import asyncio
import logging
from datetime import date
from functools import lru_cache
from operator import itemgetter
from typing import cast
from typing import Dict
from typing import Iterable
from typing import Iterator
from typing import List
from typing import Optional
from typing import Tuple
import aiohttp.cli... | PypiClean |
/MicroPyDD-0.0.7.tar.gz/MicroPyDD-0.0.7/README.md | [](https://gitlab.com/pydd/pydd/commits/master) [](https://gitlab.com/pydd/pydd/commits/master) [](https://badge.fu... | PypiClean |
/CaptainSoul-0.1.9.tar.gz/CaptainSoul-0.1.9/cptsoul/mainwindow/toolbar.py |
import gtk
from cptsoul.common import CptCommon
class ToolBar(gtk.Toolbar, CptCommon):
def __init__(self):
super(ToolBar, self).__init__()
items = []
# Connection/Deconnection Button
coButton = gtk.ToolButton(gtk.STOCK_CONNECT)
coButton.set_properties(
tooltip... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/geometry/pointclouds/pointcloud.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from random import uniform
from compas.geometry import transform_points
from compas.geometry import centroid_points
from compas.geometry import bounding_box
from compas.geometry import Primitive
from compas.geo... | PypiClean |
/OASYS1-ALS-ShadowOui-0.0.60.tar.gz/OASYS1-ALS-ShadowOui-0.0.60/orangecontrib/shadow/als/widgets/utility/ow_als_slit_integrator.py | from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from orangecontrib.shadow.util.shadow_objects import ShadowBeam
from orangecontrib.shadow.util.shadow_util import ShadowCongruenc... | PypiClean |
/LiPydomics-1.6.8-py3-none-any.whl/lipydomics/identification/characterize_lipid_rt_pred.py | from sqlite3 import connect
import os
from matplotlib import pyplot as plt
from matplotlib import rcParams
from numpy import median
from ..util import print_and_log
from .encoder_params import rt_lipid_classes, rt_fa_mods
rcParams['font.size'] = 6
def single_class_plot(cursor, lipid_class, fa_mod=None):
"""
si... | PypiClean |
/Diofant-0.14.0a2.tar.gz/Diofant-0.14.0a2/diofant/stats/crv.py | import random
from ..core import (Dummy, Expr, Integer, Lambda, Mul, S, cacheit, oo, symbols,
sympify)
from ..functions import DiracDelta, Piecewise
from ..integrals import Integral, integrate
from ..logic import And
from ..polys.polyerrors import PolynomialError
from ..sets import Interval
from ..... | PypiClean |
/CouchDB-1.2.tar.gz/CouchDB-1.2/couchdb/http.py | from base64 import b64encode
from datetime import datetime
import errno
import socket
import time
import sys
import ssl
try:
from threading import Lock
except ImportError:
from dummy_threading import Lock
try:
from http.client import BadStatusLine, HTTPConnection, HTTPSConnection
except ImportError:
f... | PypiClean |
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/utils/findpeaks.py | import ctypes
import random
import logging
import numpy as np
from multiprocessing import Pool, cpu_count
from scipy import ndimage
from eqcorrscan.utils.correlate import pool_boy
from eqcorrscan.utils.libnames import _load_cdll
from eqcorrscan.utils.clustering import dist_mat_km
Logger = logging.getLogger(__name__... | PypiClean |
/FaceChannelV1/imageProcessingUtil.py | import cv2
import numpy
from pathlib import Path
import os
import sys
class imageProcessingUtil:
faceDetectionMaximumFrequency = 10
"""Search for a new face every x frames."""
previouslyDetectedface = None
"""Identify if in the previous frame, a face was detected"""
currentFaceDetectionFreque... | PypiClean |
/evgen-0.7.tar.gz/evgen-0.7/evgen/utils.py | from past.utils import old_div
import numpy as np
import calendar
def random_test(probability):
"""
Probability test function.
"""
if np.random.random() < probability:
return True
else:
return False
class Distribution(object):
def __init__(self, elements=None, sample_size=None... | PypiClean |
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/core/engines/watson/recognize_callback.py | from typing import Callable, Any, List, Dict
import sys
# Local imports
# Third party imports
from copy import deepcopy
from ibm_watson.websocket import RecognizeCallback
from gailbot.core.utils.logger import makelogger
logger = makelogger("callback")
class WatsonException(Exception):
def __init__(self, msg: str)... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.