id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/utils/module_stats.py | import collections
import functools
from collections import namedtuple
from contextlib import contextmanager
from functools import partial
from typing import Iterable
import numpy as np
import tabulate
from .. import Tensor
from .. import functional as F
from .. import get_logger
from .. import module as M
from ..cor... | PypiClean |
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/AssignHotSpareREDFISH.py |
import argparse
import getpass
import json
import logging
import re
import requests
import sys
import time
import warnings
from datetime import datetime
from pprint import pprint
warnings.filterwarnings("ignore")
parser = argparse.ArgumentParser(description="Python script using Redfish API with OEM extension to ass... | PypiClean |
/Gbtestapi-0.1a10-py3-none-any.whl/gailbot/plugins/manager.py | from dataclasses import dataclass
import toml
import sys
import os
from typing import List, Union, Dict
import validators
from .suite import PluginSuite, MetaData
from .loader import (
PluginURLLoader,
PluginDirectoryLoader,
PluginLoader,
PluginTOMLLoader,
)
from src.gailbot.core.utils.logger import mak... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/runtime/zero/config.py |
# DeepSpeed Team
from pydantic import Field, validator
import sys
from typing import Optional
from enum import Enum
from deepspeed.runtime.config_utils import get_scalar_param, pp_int, DeepSpeedConfigModel
from deepspeed.utils import logger
from .offload_config import DeepSpeedZeroOffloadParamConfig, DeepSpeedZeroOff... | PypiClean |
/Netfoll_TL-2.0.1-py3-none-any.whl/netfoll_tl/events/messageread.py | from .common import EventBuilder, EventCommon, name_inner_event
from .. import utils
from ..tl import types
@name_inner_event
class MessageRead(EventBuilder):
"""
Occurs whenever one or more messages are read in a chat.
Args:
inbox (`bool`, optional):
If this argument is `True`, then ... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/plugins/filter/if_condition.py | from copy import copy
from jinja2 import UndefinedError
from loguru import logger
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.task import Task
from flexget.utils.template import evaluate_expression
logger = logger.bind(name='if')
class FilterIf:
"""Ca... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/secure/capability.js | if(!dojo._hasResource["dojox.secure.capability"]){
dojo._hasResource["dojox.secure.capability"]=true;
dojo.provide("dojox.secure.capability");
dojox.secure.badProps=/^__|^(apply|call|callee|caller|constructor|eval|prototype|this|unwatch|valueOf|watch)$|__$/;
dojox.secure.capability={keywords:["break","case","catch","co... | PypiClean |
/AD_Derivators-0.0.2-py3-none-any.whl/AD_Derivators/functions/tensor.py | import numpy as np
from AD_Derivators.helper_functions.ad_utils import check_number, check_array, check_list, check_anyzero, check_tan, check_anyneg, check_nontensor_input
"""
tensor.py
derivative rules for elementary operations.
"""
def sin(t):
"""
Input
=========
t (tensor.Tensor/numpy/list/scaler)
... | PypiClean |
/BornAgain-21.0-cp310-cp310-macosx_13_0_arm64.whl/bornagain/lib/libBornAgainParam.py |
from sys import version_info as _swig_python_version_info
import _libBornAgainParam
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return ... | PypiClean |
/DjAIoT-23.6.21.1.tar.gz/DjAIoT-23.6.21.1/src/djaiot/device_data/models/physical_data_type.py | class PhysicalDataTypeMinChoices(IntegerChoices):
ZERO = 0, '0'
INT8 = -2 ** 7, 'Int8 Min = {:,}'.format(-2 ** 7)
INT16 = -2 ** 15, 'Int16 Min = {:,}'.format(-2 ** 15)
NEG_POW_2_30 = -2 ** 30, '-2^30 = {:,}'.format(- 2 ** 30)
INT32 = -2 ** 31, 'Int32 Min = {:,}'.format(-2 ** 31)
INT64 = -2 ... | PypiClean |
/Adafruit_SSD1306-1.6.2.tar.gz/Adafruit_SSD1306-1.6.2/README.md | Adafruit Python SSD1306
=======================
Python library to use SSD1306-based 128x64 or 128x32 pixel OLED displays with a Raspberry Pi or Beaglebone Black.
Designed specifically to work with the Adafruit SSD1306-based OLED displays ----> https://www.adafruit.com/categories/98
Adafruit invests time and resource... | PypiClean |
/AMPcombi-0.1.7.tar.gz/AMPcombi-0.1.7/ampcombi/amp_database.py |
# TITLE: Download the DRAMP database if input db empty AND and make database compatible for diamond
import pandas as pd
import requests
import os
from datetime import datetime
import subprocess
from Bio import SeqIO
import tempfile
import shutil
########################################
# FUNCTION: DOWNLOAD DRAMP DA... | PypiClean |
/Editra-0.7.20.tar.gz/Editra-0.7.20/src/ed_mdlg.py | __author__ = "Cody Precord <cprecord@editra.org>"
__svnid__ = "$Id: ed_mdlg.py 66817 2011-01-29 21:32:20Z CJP $"
__revision__ = "$Revision: 66817 $"
#--------------------------------------------------------------------------#
# Imports
import wx
import wx.stc
from extern.embeddedimage import PyEmbeddedImage
# Editra ... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/js/bootstrap-extras.js | $(function()
{
// Form css tweaks.
$('.middle input:text, .middle input:password, textarea').not('[class]').addClass('input-xlarge');
$('.control-group label').addClass('control-label');
var $dropdowns = $('li.dropdown'); // Specifying the element is faster for older browsers
/**
* Mouse eve... | PypiClean |
/OSfooler-ng-1.0a0.tar.gz/OSfooler-ng-1.0a0/LICENSE.md | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Pream... | PypiClean |
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/svg/__init__.py | import wx
from six.moves import zip_longest
from ._nanosvg import *
# All the supported renderers now support gradient transforms, more or less, but
# let's leave this in place in case it's needed again in the future.
_RenderersWithoutGradientTransforms = []
class SVGimage(SVGimageBase):
"""
The SVGimage cl... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/tree/ReformulationImportStatements.py | from nuitka.nodes.ConstantRefNodes import makeConstantRefNode
from nuitka.nodes.FutureSpecs import FutureSpec
from nuitka.nodes.GlobalsLocalsNodes import ExpressionBuiltinGlobals
from nuitka.nodes.ImportNodes import (
ExpressionBuiltinImport,
ExpressionImportName,
StatementImportStar,
makeExpressionImpo... | PypiClean |
/aleksis_core-3.1.5-py3-none-any.whl/aleksis/core/schema/group.py | from django.core.exceptions import PermissionDenied
from graphene_django import DjangoObjectType
from guardian.shortcuts import get_objects_for_user
from ..models import Group, Person
from ..util.core_helpers import has_person
class GroupType(DjangoObjectType):
class Meta:
model = Group
fields =... | PypiClean |
/LAMDA-SSL-1.0.2.tar.gz/LAMDA-SSL-1.0.2/LAMDA_SSL/Search/BayesSearchCV.py | from sklearn.model_selection._search import BaseSearchCV,ParameterGrid
from collections.abc import Mapping
from sklearn.utils import check_random_state
import numpy as np
import time
from sklearn.model_selection._validation import _fit_and_score
from sklearn.model_selection._validation import _insert_error_scores
from ... | PypiClean |
/Leye_classifer_v2-0.0.2.tar.gz/Leye_classifer_v2-0.0.2/README.txt | Hello, you are welcome to Leye classifier
A sentiment lexicon algorithm to classify pidgin English and English text into positive, negative or neutral
To use this system, you can enter raw text directly or enter your document name which should be in a csv file format (for example, data.csv). You need to name the col... | PypiClean |
/AI4Water-1.6.tar.gz/AI4Water-1.6/ai4water/experiments/_dl.py | __all__ = ["DLRegressionExperiments", "DLClassificationExperiments"]
from ai4water.backend import tf
from ai4water.utils.utils import jsonize
from ai4water.hyperopt import Integer, Real, Categorical
from ai4water.utils.utils import dateandtime_now
from ai4water.models import MLP, CNN, LSTM, CNNLSTM, LSTMAutoEncoder, T... | PypiClean |
/BTEdb-7.0.1.tar.gz/BTEdb-7.0.1/BTEdb.py | import sys, json, copy, dill, base64, os, itertools
if __name__ == "__main__":
print("Python schemaless JSON/YAML database interface")
print("Do not execute directly")
sys.exit(1)
# Define exceptions
class DatabaseNotCreatedException(BaseException):
pass
class DatabaseWriteIOErrorException(BaseException):
pass
cla... | PypiClean |
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/modules/classifiers/gpt2_classifier.py | import sys
from typing import Optional, Tuple, Union
import torch
from torch import nn
from torch.nn import functional as F
from BIT_DL.pytorch.core.layers import get_initializer
from BIT_DL.pytorch.hyperparams import HParams
from BIT_DL.pytorch.modules.classifiers.classifier_base import ClassifierBase
from BIT_DL.py... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/src/obiselect.py | from obitools.format.options import addInOutputOption, sequenceWriterGenerator
from obitools.options import getOptionManager
from obitools.ecopcr.options import addTaxonomyDBOptions, loadTaxonomyDatabase
from random import random
from obitools.utils import progressBar
import math
import sys
from obitools.utils.bioseq i... | PypiClean |
/OASYS1-WONDER-1.0.45.tar.gz/OASYS1-WONDER-1.0.45/orangecontrib/wonder/widgets/gui/ow_generic_parameter_widget.py |
from PyQt5.QtWidgets import QMessageBox
from orangewidget.settings import Setting
from orangewidget import gui as orangegui
from orangewidget.widget import OWAction
from orangecontrib.wonder.fit.parameters.fit_global_parameters import FitGlobalParameters
from orangecontrib.wonder.fit.parameters.instrument.instrument... | PypiClean |
/AutoTransform-1.1.1a8-py3-none-any.whl/autotransform/scripts/commands/run.py |
# @black_format
"""The run command is used to execute a full run of a schema, either locally
or by kicking off a remote job."""
import json
import os
from argparse import ArgumentParser, Namespace
from autotransform.config import get_config
from autotransform.event.debug import DebugEvent
from autotransform.event.h... | PypiClean |
/CGlue-0.2.4.tar.gz/CGlue-0.2.4/cglue/plugins/Locks.py | from cglue.cglue import Plugin, CGlue
from cglue.signal import SignalConnection
can_be_async = [
'WriteData',
'WriteIndexedData',
'WriteQueuedData',
'ReadValue',
'ReadIndexedValue',
'ReadQueuedValue'
]
def add_async_flag(owner: CGlue):
"""Add the 'async' optional flag to supported port ty... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/lang/zh-cn.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang['zh-cn']={"dir":"ltr","editor":"所见即所得编辑器","common":{"editorHelp":"按 ALT+0 获得帮助","browseServer":"浏览服务器","url":"URL","protocol":"协议","upload":"上传","uploadSubmit":... | PypiClean |
/CloudFerry-1.55.2.tar.gz/CloudFerry-1.55.2/cloudferry/actions/live_migration/live_migration.py | import logging
import os
from fabric.operations import prompt
from oslo_config import cfg
from cloudferry.lib.base.action import action
from cloudferry.lib.os.compute import libvirt
from cloudferry.lib.os.compute.nova_compute import instance_host
from cloudferry.lib.os.compute.nova_compute import instance_libvirt_nam... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/auth/sign_in.py |
import logging
from typing import Union
import pyrogram
from pyrogram import raw
from pyrogram import types
log = logging.getLogger(__name__)
class SignIn:
async def sign_in(
self: "pyrogram.Client",
phone_number: str,
phone_code_hash: str,
phone_code: str
) -> Union["types.... | PypiClean |
/CaseRecommender-1.1.1.tar.gz/CaseRecommender-1.1.1/caserec/recommenders/item_recommendation/random_rec.py | # © 2019. Case Recommender (MIT License)
import random
from caserec.recommenders.item_recommendation.base_item_recommendation import BaseItemRecommendation
from caserec.utils.extra_functions import timed
__author__ = 'Arthur Fortes <fortes.arthur@gmail.com>'
class RandomRec(BaseItemRecommendation):
def __init_... | PypiClean |
/AnumbyRobotSJ-2.4.6-py3-none-any.whl/AnumbyFormes/__main__.py | import sys
import argparse
import tkinter as tk
from tkinter import *
from PIL import ImageGrab
from PIL import Image
import cv2 as cv
from random import *
import numpy as np
import re
import os
import tensorflow as tf
from tensorflow import keras
import pandas as pd
import pwk
HERE = os.path.normpath(os.path.dirna... | PypiClean |
/Aksarantara-1.1.0-py3-none-any.whl/aksarantara/convert.py | import Map as GM, fixer as CF, pre_processing as PrP
import post_processing as PP
import East.SiddhamRanjana as SR
import data as FB
import string
import re
from functools import cmp_to_key
import json
import trans
def TamilSort(x, y):
if "\u0B83" in x[0] and len(x[0]) != 1:
return -1
elif x[0] < y[0]:... | PypiClean |
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/tweak/shell/vendor/codemirror-2.13/mode/stex/stex.js | CodeMirror.defineMode("stex", function(cmCfg, modeCfg)
{
function pushCommand(state, command) {
state.cmdState.push(command);
}
function peekCommand(state) {
if (state.cmdState.length>0)
return state.cmdState[state.cmdState.length-1];
else
return null;
}
function popCommand(stat... | PypiClean |
/HOPP-0.0.5-py3-none-any.whl/tools/optimization/command_line_tools/run_utils.py | import errno
import json
import os
import sys
from datetime import datetime
from typing import Optional
from . import config_tools
def makedir_if_not_exists(filename: str) -> None:
try:
os.makedirs(filename)
except OSError as e:
if e.errno != errno.EEXIST:
raise
def setup_run(
... | PypiClean |
/AppState-0.1.tar.gz/AppState-0.1/README | =AppState=
==Application Shared State==
Copyright 2008, Nathan Whitehead
Released under Apache-2.0 and MIT licenses (see LICENSE section)
This module allows your Python programs to easily have a persistent
global shared state. This state can be used to store things like
number of users, game high scores, message of... | PypiClean |
/DPark-0.5.0.tar.gz/DPark-0.5.0/dpark/job.py | from __future__ import absolute_import, print_function
import math
import time
import socket
from operator import itemgetter
from dpark.utils.tdigest import TDigest
from dpark.utils.log import (
get_logger, make_progress_bar
)
from dpark.hostatus import TaskHostManager
from six.moves import range
logger = get_log... | PypiClean |
/Nevow-0.14.5.tar.gz/Nevow-0.14.5/nevow/loaders.py | import warnings
import os.path
from zope.interface import implements
from twisted.python.reflect import getClass
from twisted.web import microdom
from nevow import inevow
from nevow import flat
from nevow.flat import flatsax
from nevow.util import CachedFile
class stan(object):
"""A stan tags document factory"... | PypiClean |
/GeoBases3K-5.0.16.zip/GeoBases3K-5.0.16/GeoBases/MapAssets/map.js | if (!String.fmt) {
String.prototype.fmt = function() {
var formatted = this;
var i;
for (i=0; i<arguments.length; i++) {
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
formatted = formatted.replace(regexp, arguments[i]);
}
return formatted;
};
}
f... | PypiClean |
/Chameleon-4.1.0.tar.gz/Chameleon-4.1.0/src/chameleon/codegen.py | import ast
import builtins
import textwrap
import types
from .astutil import ASTCodeGenerator
from .astutil import Builtin
from .astutil import Symbol
from .astutil import load
from .astutil import node_annotations
from .astutil import parse
from .astutil import store
from .exc import CompilationError
reverse_builti... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/baselib/jpackages/Domain.py | from JumpScale import j
import JumpScale.baselib.mercurial
class Domain():
"""
is representation of domain
source can come from tgz or from mercurial
"""
def __init__(self, domainname,qualityLevel=None): ## Init must come after definition of lazy getters and setters!
self.domainname = ... | PypiClean |
/OGER-1.5.tar.gz/OGER-1.5/oger/server/client.py |
# Author: Lenz Furrer, 2018
'''
Client parameters accepted by the API.
'''
from ..ctrl import parameters
IN_PARAMS = [
'include_mesh',
'mesh_as_entities',
'single_section',
'sentence_split',
'byte_offsets_out',
'sentence_tokenizer',
'field_names',
]
OUT_PARAMS = [
'include_header'... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/__init__.py |
import datetime
import os
from pathlib import Path
from warnings import warn
import pkg_resources
from apppath import AppPath
__project__ = "NeodroidVision"
__author__ = "Christian Heider Nielsen"
__version__ = "0.3.0"
__doc__ = r"""
.. module:: neodroidvision
:platform: Unix, Windows
:synopsis: A set of gener... | PypiClean |
/Bigauss_probability_distribution-0.1.tar.gz/Bigauss_probability_distribution-0.1/Bigauss_probability_distribution/Gaussiandistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Gaussian(Distribution):
""" Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
Attributes:
mean (float) representing the mean value of the distribution
stdev (float) representing ... | PypiClean |
/LIFEsim-0.2.29.tar.gz/LIFEsim-0.2.29/lifesim/core/data.py | import sys
import warnings
import numpy as np
import pandas as pd
from astropy.io import fits
from astropy.coordinates import SkyCoord, BarycentricMeanEcliptic
from lifesim.util.options import Options
from lifesim.util.habitable import single_habitable_zone
# TODO: automatically add data storage for all
class Data(... | PypiClean |
/Cubane-1.0.11.tar.gz/Cubane-1.0.11/cubane/default_frontend/static/cubane/default_frontend/js/default_frontend.js | (function(globals){
"use strict";
/*
* function.bind() helper (functionPrototypeBind.js)
*/
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
th... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/chownr/chownr.js | 'use strict'
const fs = require('fs')
const path = require('path')
/* istanbul ignore next */
const LCHOWN = fs.lchown ? 'lchown' : 'chown'
/* istanbul ignore next */
const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
/* istanbul ignore next */
const needEISDIRHandled = fs.lchown &&
!process.version.matc... | PypiClean |
/AppMetrics-0.5.0.tar.gz/AppMetrics-0.5.0/appmetrics/meter.py | import math
import time
import threading
DEFAULT_TICK_INTERVAL = 5
class EWMA(object):
"""
Compute exponential-weighted moving average of values incoming at a fixed rate.
http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
"""
def __init__(self, time_period, tick_interval):
... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/convection/exponential1D/cylindricalMesh1DNonUniform.py | r"""
This example solves the steady-state cylindrical convection-diffusion equation
given by
.. math::
\nabla \cdot \left(D \nabla \phi + \vec{u} \phi \right) = 0
with coefficients :math:`D = 1` and :math:`\vec{u} = (10,)`, or
>>> diffCoeff = 1.
>>> convCoeff = ((10.,),)
We define a 1D cylindrical mesh represe... | PypiClean |
/NEMO_CE-1.6.12-py3-none-any.whl/NEMO/migrations/0026_version_3_7_0.py |
from django.conf import settings
from django.db import migrations, models
import django.utils.timezone
from NEMO.migrations_utils import create_news_for_version
class Migration(migrations.Migration):
dependencies = [
('NEMO', '0025_version_3_6_0'),
]
def new_version_news(apps, schema_editor):
... | PypiClean |
/HomeLab-0.1.36.tar.gz/HomeLab-0.1.36/homelab/control/jobscheduler.py | import logging
import threading
import time
from enum import Enum
from homelab.analysis.devicelibrary import getDeviceLibrary
from homelab.analysis.networkscanner import getNetworkScanner
from homelab.analysis.trafficanalyzer import getTrafficAnalyzer
class Job(Enum):
FINGERPRINT = 1
DEVICE_SEARCH = 2
NE... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/wrappers/genbank_embl.py | from itertools import chain
import re
from ..constants import *
from .. utils import util, nested_array
from .. utils.missing import Missing
from ..itypes import detector, rtypes, dimpaths, dimensions
from .. import repops_multi
import wrapper
from .. import ops
import python
from pyparsing import *
data_class = {'CO... | PypiClean |
/Finance-Ultron-1.0.8.1.tar.gz/Finance-Ultron-1.0.8.1/ultron/ump/model/creater.py | from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
from sklearn.ensemble import AdaBoostRegressor
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble import BaggingClassifier
from sklearn.ensemble import BaggingRegressor
from sklearn.ensemble import RandomForestClassifier
from sk... | PypiClean |
/Log_Api-0.1-py3-none-any.whl/Log_Api/Models/LogAPI.py | from sqlalchemy import Column, Integer, String, Text, TIMESTAMP, sql
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class LogAPI(Base):
__tablename__ = 'LOG_APIS'
ID = Column(Integer, primary_key=True,
autoincrement=True, comment='Id del registro')
USERN... | PypiClean |
/Ekpenisi-0.1.0-py3-none-any.whl/semantics/number.py | import re
class Number(object):
def __init__(self):
self.small = {'zero': 0,'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9, 'ten': 10, 'eleven': 11, 'twelve': 12, 'thirteen'... | PypiClean |
/BackupPC-Clone-1.0.1.tar.gz/BackupPC-Clone-1.0.1/backuppc_clone/helper/BackupInfoScanner.py | import os
import re
from backuppc_clone.Config import Config
from backuppc_clone.DataLayer import DataLayer
class BackupInfoScanner:
"""
Class for retrieving information about backups.
"""
# -------------------------------------------------------------------------------------------------------------... | PypiClean |
/MD2K_Cerebral_Cortex-3.0.0-py3-none-any.whl/cerebralcortex/core/data_manager/object/storage_minio.py |
import json
import os
from typing import List
import traceback
class MinioHandler:
"""
Todo:
For now, Minio is disabled as CC config doesn't provide an option to use mutliple object-storage
"""
###################################################################
################## GET DATA... | PypiClean |
/FairCore-5.0.2.tar.gz/FairCore-5.0.2/F/CLASS/Listener.py | import F
from .Function import FairFunction
# import typing as t
class FairListener:
lid = F.get_uuid()
registered_functions: [FairFunction] = []
callback_function: FairFunction = None
def add_callback_function(self, func:FairFunction):
self.callback_function = func
def run_func(self):
... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct06.py | from genice2.cell import cellvectors
import genice2.lattices
desc = {"ref": {"SpaceFullerene": 'Sikiric 2010'},
"usage": "No options available.",
"brief": "A space fullerene."
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.pairs = """
2 323
223 ... | PypiClean |
/DoorPi-2.4.1.8.tar.gz/DoorPi-2.4.1.8/doorpi/status/requirements_lib/req_event_handler.py |
import logging
logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
REQUIREMENT = dict(
fulfilled_with_one = False,
text_description = '''
Der Event-Handler ist das Herz-Stück von DoorPi und die Vermittlerstelle zwischen den Events und Actions.
Bei Ihm müssen sich alle Module anmelden, die... | PypiClean |
/GailBot-0.2a0-py3-none-any.whl/gailbot/plugins/manager.py | from dataclasses import dataclass
import toml
import sys
import os
from typing import List, Union, Dict
import validators
from .suite import PluginSuite, MetaData
from .loader import (
PluginURLLoader,
PluginDirectoryLoader,
PluginLoader,
PluginTOMLLoader,
)
from gailbot.core.utils.logger import makelog... | PypiClean |
/Docassemble-Pattern-3.6.7.tar.gz/Docassemble-Pattern-3.6.7/docassemble_pattern/text/en/modality.py |
from __future__ import unicode_literals
from __future__ import division
from builtins import str, bytes, dict, int
from builtins import map, zip, filter
from builtins import object, range
### LIST FUNCTIONS #################################################################################
def find(function, list):
... | PypiClean |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/blog/migrations/south/0019_auto__add_field_blogpost_rating_sum.py | import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
user_orm_label = '%s.%s' % (User._meta... | PypiClean |
/DelumoWave-0.1.27-py3-none-any.whl/delumowave/controller.py |
import errno
import logging
from time import time, sleep
from typing import Union, Optional
import serial
from serial import SerialException
from delumowave.config.delumo import (DEVICE, COMMAND, EEPROM_SIZE)
# import threading
from threading import Lock as threading_lock
from multiprocessing import Lock as multipr... | PypiClean |
/Axis42-0.0.11.tar.gz/Axis42-0.0.11/axis42/Axis.py | from dotenv import load_dotenv
load_dotenv()
from axis42.settings import AXIS_USER, AXIS_PASSWORD, AXIS_URL, CAMPUS_ID, LOG_FILE_PATH
from axis42.Axis_api import Axis_api
from axis42.utils import substring
from axis42.User import User
#TODO: Do some error handling functions
#TODO: Switch to a more pythonic way of doi... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/xinha/plugins/HtmlEntities/Entities.js | {
"¡" : "¡",
"¢" : "¢",
"£" : "£",
"¤" : "¤",
"¥" : "¥",
"¦" : "¦",
"§" : "§",
"¨" : "¨",
"©" : "©",
"ª" : "ª",
"«" : "«",
"¬" : "¬",
"®" : "®",
"¯" : "¯",
"°" : "°",
"±" : "±",
"²" : "²",
"³" : "³",
"´" : "´",
"µ"... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist/models/entityroot.py | from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2014, G. Klyne"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import logging
log = logging.getLogger(__name__)
import os
i... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/tree/ReformulationSequenceCreation.py | from nuitka.nodes.BuiltinIteratorNodes import ExpressionBuiltinIter1
from nuitka.nodes.BuiltinNextNodes import ExpressionBuiltinNext1
from nuitka.nodes.BuiltinTypeNodes import ExpressionBuiltinTuple
from nuitka.nodes.ConstantRefNodes import makeConstantRefNode
from nuitka.nodes.ContainerMakingNodes import (
makeExp... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/diag_scripts/mlr/__init__.py |
import logging
import os
import re
import warnings
from copy import deepcopy
from functools import lru_cache
from pprint import pformat
import esmvalcore.preprocessor
import iris
import numpy as np
import shapely.vectorized as shp_vect
from cartopy.io import shapereader
from cf_units import Unit
from iris.fileformats... | PypiClean |
/Interleave_Playlist-1.0.0a7-py3-none-any.whl/interleave_playlist/interface/SearchBarThread.py | import typing
from threading import Lock
from time import time_ns
from PySide6.QtCore import QThread, Signal, SignalInstance
class SearchBarThreadAlreadyDeadException(BaseException):
pass
class SearchBarThread(QThread):
completed = typing.cast(SignalInstance, Signal(str))
error = typing.cast(SignalInst... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/deployment/commands/upgradedb.py | from datetime import datetime
from euphorie.client import model
from pkg_resources import get_distribution
from pkg_resources import parse_version
from sqlalchemy import sql
from sqlalchemy.engine.reflection import Inspector
from sys import argv
from transaction import commit
from z3c.saconfig import Session
from Zope2... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/chats/ban_chat_member.py |
from datetime import datetime
from typing import Union
import pyrogram
from pyrogram import raw, utils
from pyrogram import types
class BanChatMember:
async def ban_chat_member(
self: "pyrogram.Client",
chat_id: Union[int, str],
user_id: Union[int, str],
until_date: datetime = ut... | PypiClean |
/CryptoParser-0.10.0.tar.gz/CryptoParser-0.10.0/cryptoparser/common/x509.py |
import datetime
import enum
import attr
from cryptodatahub.common.stores import CertificateTransparencyLog, CertificateTransparencyLogParamsBase
from cryptoparser.common.base import (
Opaque,
OpaqueParam,
Serializable,
VectorParamParsable,
VectorParsable,
)
from cryptoparser.common.parse import ... | PypiClean |
/DI-searching-0.0.0.tar.gz/DI-searching-0.0.0/disearch/engine/base_rl_engine.py | import numpy as np
from typing import Any, Dict, Callable, List, Optional, Tuple
from .base_search_engine import BaseSearchEngine, ENGINE_REGISTRY
from disearch.problem import ProblemEnv
from ding.utils import deep_merge_dicts
from ding.worker import BaseLearner, SampleSerialCollector
class BaseRLEngine(BaseSearchEn... | PypiClean |
/BlurWal-1.1.1.tar.gz/BlurWal-1.1.1/README.md | <div align="center">
<img src="https://gitlab.com/BVollmerhaus/blurwal/raw/master/blurwal-logo.svg"
title='"Wal" is short for "Wallpaper", but also means "Whale" in German – hence the logo.'
alt="BlurWal Logo" width="30%" />
</div>
<div align="center">
<p>Smoothly blurs the wallpaper when windows are... | PypiClean |
/K2SC-1.0.2.1-py3-none-any.whl/k2sc/ls.py | from numpy import *
from numpy.fft import *
def __spread__(y, yy, n, x, m):
"""
Given an array yy(0:n-1), extirpolate (spread) a value y into
m actual array elements that best approximate the "fictional"
(i.e., possible noninteger) array element number x. The weights
used are coefficients of the Lagrange int... | PypiClean |
/MatrixCalculator-0.1.7.tar.gz/MatrixCalculator-0.1.7/README |
DESCRIPTION
------------------------------------------
This is a python application that lets you compute basic matrix operations.
Current features include:
-addition
-subtraction
-multiplication
-scalar multiplication
-transpose
-determinant
-inverse
CHANGES
----------------------------... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/glob2/glob2/impl.py |
from __future__ import absolute_import
import sys
import os
import re
from os.path import join
from . import fnmatch
try:
from itertools import imap
except ImportError:
imap = map
class Globber(object):
listdir = staticmethod(os.listdir)
isdir = staticmethod(os.path.isdir)
islink = staticmetho... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/bootstrap/dist/js/bootstrap.js | if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
throw new Error('Bootstrap\'... | PypiClean |
/GDEFReader-0.0.1a41-py3-none-any.whl/gdef_reader/utils.py | from __future__ import annotations
import pickle
from pathlib import Path
from typing import Optional, TYPE_CHECKING, Literal
import numpy as np
# todo: optional import:
from pptx_tools.creator import PPTXCreator
from pptx_tools.templates import AbstractTemplate
from scipy.stats import norm
from gdef_reporter.pptx_s... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/api/attachments_api.py | import re # noqa: F401
import sys # noqa: F401
from MergePythonSDK.shared.api_client import ApiClient, Endpoint as _Endpoint
from MergePythonSDK.shared.model_utils import ( # noqa: F401
check_allowed_values,
check_validations,
date,
datetime,
file_type,
none_type,
validate_and_convert_ty... | PypiClean |
/MambuPy-2.0.0b22.tar.gz/MambuPy-2.0.0b22/mambupy/api/entities.py | import copy
from importlib import import_module
import json
import logging
import time
from .classes import GenericClass
from .interfaces import (
MambuWritable,
MambuAttachable,
MambuSearchable,
MambuCommentable,
MambuOwnable,
)
from .connector.rest import MambuConnectorREST
from .mambustruct impo... | PypiClean |
/2wf90-assignment-1.0.8.tar.gz/2wf90-assignment-1.0.8/src/2wf90_assignment/Context.py | import re
from Integer import *
from algorithmsCombined import *
class Context():
"""
"""
def __init__(self):
self.reset()
def reset(self):
self.x = None
self.y = None
self.radix = None
self.op = None
self.m = None
def read_line(self, line):
... | PypiClean |
/GlobalPayments.Api-1.0.9.tar.gz/GlobalPayments.Api-1.0.9/globalpayments/api/payment_methods/debit.py | import re
import globalpayments as gp
from globalpayments.api.entities.enums import (
CvnPresenceIndicator, PaymentMethodType, TransactionType)
class DebitTrackData(object):
encryption_data = None
payment_method_type = PaymentMethodType.Debit
pin_block = None
value = None
@property
def is... | PypiClean |
/NumBase-0.2.tar.gz/NumBase-0.2/README.md | # NumBase Class
A class for translating numbers from different number systems to any other
number system up to the hexadecimal number system and performing basic
arithmetic operations with numbers in different
and identical number systems
Attributes:
number (str), input number
base (int) its input system
TODO: Complet... | PypiClean |
/MyProxyWebService-0.2.3.tar.gz/MyProxyWebService-0.2.3/ez_setup.py | import sys
DEFAULT_VERSION = "0.6c3"
DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = {
'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
'setuptools-0.6b2-py2.3.egg': '5... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/lang/gu.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang.gu={dir:'ltr',editorTitle:'Rich text editor, %1, press ALT 0 for help.',toolbar:'Toolbar',editor:'Rich Text Editor',source:'મૂળ કે પ્રાથમિક દસ્તાવેજ',newPage:'... | PypiClean |
/Mongothon-0.8.0.tar.gz/Mongothon-0.8.0/mongothon/model.py | import re
import types
from copy import deepcopy, copy
from bson import ObjectId
from .document import Document
from .queries import ScopeBuilder
from .exceptions import NotFoundException
from .events import EventHandlerRegistrar
from .scopes import STANDARD_SCOPES
OBJECTIDEXPR = re.compile(r"^[a-fA-F0-9]{24}$")
cl... | PypiClean |
/LiPydomics-1.6.8-py3-none-any.whl/lipydomics/identification/build_database.py | import os
import shutil
from sqlite3 import connect
from ..util import gen_tstamp
from .db_table_defs import measured, theo_mz, theo_ccs, theo_rt
from .fill_measured_from_src import main as fill_from_src
from .fill_theo_mz_from_gen import main as gen_theo_mz
from .train_lipid_ccs_pred import main as train_ccs_pred
fro... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/demo/Calc.py | from muntjac.api import Application, Button, GridLayout, Label, Window
from muntjac.ui.button import IClickListener
class Calc(Application, IClickListener):
"""A simple calculator using Muntjac."""
def __init__(self):
super(Calc, self).__init__()
# All variables are automatically stored in ... | PypiClean |
/Flask_JSONRPC-2.2.2-py3-none-any.whl/flask_jsonrpc/contrib/browse/static/js/libs/angular/angular-animate.min.js | (function(A,s,B){'use strict';s.module("ngAnimate",["ng"]).config(["$provide","$animateProvider",function(N,D){var z=s.noop,k=s.forEach,X=D.$$selectors,T=1,f="$$ngAnimateState",E="ng-animate",g={running:!0};N.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$timeout","$rootScope","$document",fun... | PypiClean |
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/methods/advanced/invoke.py |
import logging
import hikkapyro
from hikkapyro import raw
from hikkapyro.raw.core import TLObject
from hikkapyro.session import Session
log = logging.getLogger(__name__)
class Invoke:
async def invoke(
self: "hikkapyro.Client",
query: TLObject,
retries: int = Session.MAX_RETRIES,
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/utils/Shebang.py | import os
import re
def getShebangFromSource(source_code):
"""Given source code, extract the shebang (#!) part.
Notes:
This function is less relevant on Windows, because it will not use
this method of determining the execution. Still scripts aimed at
multiple platforms will contain it... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/necks/channel_mapper.py | import torch.nn as nn
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule
from ..builder import NECKS
@NECKS.register_module()
class ChannelMapper(BaseModule):
r"""Channel Mapper to reduce/increase channels of backbone features.
This is used to reduce/increase channels of backbone features.
... | PypiClean |
/Homevee_Dev-0.0.0.0-py3-none-any.whl/Homevee/Manager/user.py |
from Homevee.Exception import ItemNotFoundException
from Homevee.Item.Status import *
from Homevee.Item.User import User, Permission
def set_user_fcm_token(user, token, db):
user.fcm_token = token
try:
user.save_to_db(db)
return Status(type=STATUS_OK).get_dict()
except:
return St... | PypiClean |
/Altair%20Smartworks%20SDK-0.0.1.tar.gz/Altair Smartworks SDK-0.0.1/openapi_client/model/error_response.py | import re # noqa: F401
import sys # noqa: F401
from openapi_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 |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/configs/sabl/sabl_retinanet_r101_fpn_gn_2x_ms_480_960_coco.py | _base_ = [
'../_base_/models/retinanet_r50_fpn.py',
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py'
]
# model settings
norm_cfg = dict(type='GN', num_groups=32, requires_grad=True)
model = dict(
backbone=dict(
depth=101,
init_c... | PypiClean |
/Django-Bootstrap3-Validator-0.3.3.zip/Django-Bootstrap3-Validator-0.3.3/bootstrap_validator/static/validator/js/language/cs_CZ.js | (function($) {
/**
* Czech language package
* Translated by @AdwinTrave. Improved by @cuchac
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Prosím zadejte správný base64'
},
between: {
'default... | PypiClean |
/InvokeAI-3.1.0-py3-none-any.whl/invokeai/app/invocations/noise.py |
import torch
from pydantic import validator
from invokeai.app.invocations.latent import LatentsField
from invokeai.app.util.misc import SEED_MAX, get_random_seed
from ...backend.util.devices import choose_torch_device, torch_dtype
from .baseinvocation import (
BaseInvocation,
BaseInvocationOutput,
Field... | PypiClean |
/ITMO_FS-0.3.3.tar.gz/ITMO_FS-0.3.3/ITMO_FS/filters/multivariate/DISRwithMassive.py | import numpy as np
from ITMO_FS.utils.information_theory import entropy
from ITMO_FS.utils.information_theory import mutual_information
from ...utils import DataChecker, generate_features
def _complementarity(x_i, x_j, y):
return entropy(x_i) + entropy(x_j) + entropy(y) - entropy(list(zip(x_i, x_j))) - \
... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.