id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/gis/gdal/prototypes/geom.py | from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p
from django.contrib.gis.gdal.envelope import OGREnvelope
from django.contrib.gis.gdal.libgdal import lgdal
from django.contrib.gis.gdal.prototypes.errcheck import check_envelope
from django.contrib.gis.gdal.prototypes.generation import (
const_string_... | PypiClean |
/LinOTPAdminClientGUI-2.9.1.tar.gz/LinOTPAdminClientGUI-2.9.1/bin/glinotpadm.py | from linotpadminclientgui import __version__
import sys, os
import pygtk
pygtk.require("2.0")
import gtk
import re
import gobject
import ConfigParser
import locale
import gettext
import random
import platform
import pprint
import logging
import logging.handlers
import json
import types
from datetime import datetime
f... | PypiClean |
/BrainFreeze-0.1rc2.tar.gz/BrainFreeze-0.1rc2/brainfreeze/release/__init__.py | import os
from textwrap import dedent
from distutils import log
from distutils.core import Command
from distutils.errors import DistutilsOptionError
# Define pypi release information
NAME = "BrainFreeze"
VERSION = "0.1rc2"
DESCRIPTION = dedent("""
BrainFreeze is an SQLAlchemy plugin that supports object compositio... | PypiClean |
/OGER-1.5.tar.gz/OGER-1.5/oger/ctrl/router.py |
# Author: Lenz Furrer, 2016
'''
Skeleton of the pipeline.
Make sure all components are connected with each other
according to the parameters.
This module:
- provides iterators for looping through paths/IDs/documents
- defines a class for running the pipeline in server mode
- takes care of feeding the right paramet... | PypiClean |
/karlsruher-3.0b2.tar.gz/Karlsruher-3.0b2/karlsruher/tweepyx.py | import os
import tweepy
import yaml
# pylint: disable=invalid-name
class tweepyx:
'''Feature YAML file base authentication'''
# Template for YAML files:
YAML_TEMPLATE = '''
twitter:
consumer:
key: '{0}'
secret: '{1}'
access:
key: '{2}'
secret: '{3}'
'''.strip()
... | PypiClean |
/Aj_Zsl_nlu-4.2.0-py3-none-any.whl/nlu/pipe/extractors/extractor_configs_OS.py | from nlu.pipe.extractors.extractor_base_data_classes import SparkNLPExtractor, SparkNLPExtractorConfig
from nlu.pipe.extractors.extractor_methods.helper_extractor_methods import *
"""
This file contains methods to get pre-defined configurations for every annotator.
Extractor_resolver.py should be used to resolve Spark... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/management/commands/wms_options_set.py |
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from eoxserver.resources.coverages.management.commands import (
CommandOutputMixIn,
)
from eoxserver.services.management.commands.wms_options_load import (
insert_or_update_wms_opt,
)
class Command(CommandOutpu... | PypiClean |
/NovalIDE-1.1.8-py3-none-any.whl/noval/python/debugger/executor.py | from noval import GetApp,_
from tkinter import messagebox
import noval.project.executor as executor
import noval.util.strutils as strutils
import noval.ui_common as ui_common
import noval.util.utils as utils
import tempfile
import subprocess
class CommonExecutorMixin:
def __init__(self):
self.is_windows_ap... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/codemirror/js/mode/dylan/dylan.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use s... | PypiClean |
/AppTrack-1.0.tar.gz/AppTrack-1.0/apptrack/span.py |
from __future__ import absolute_import
import time
import sys
import os
import json
import inspect
import threading
import traceback
import logging
import opentracing
from opentracing.ext import tags as opentracing_tags
from opentracing.propagation import SpanContextCorruptedException
import datetime
from .utils im... | PypiClean |
/FreeTVG-karjakak-3.2.16.tar.gz/FreeTVG-karjakak-3.2.16/TVG/FreeTVG.py |
import ast
import importlib
import json
import os
import re
import string
from datetime import datetime as dt
from functools import partial
from itertools import islice
from pathlib import Path
from sys import platform
from tkinter import (
BROWSE,
DISABLED,
END,
GROOVE,
INSERT,
LEFT,
MULT... | PypiClean |
/Fletxible-0.7.1-py3-none-any.whl/core/drawer.py | import flet as ft
from core.repo_data import RepoData
class Drawer(ft.Container):
def __init__(
self,
docs: dict,
page: ft.Page,
expand=True,
width=0,
bgcolor="#23262d",
shadow=None,
animate=ft.Animation(550, "ease"),
content=ft.Column(
... | PypiClean |
/OASYS1-ESRF-Extensions-0.0.69.tar.gz/OASYS1-ESRF-Extensions-0.0.69/orangecontrib/esrf/wofry/util/toolbox.py | import numpy
from scipy.interpolate import interp2d
import scipy.constants as codata
import xraylib
from oasys.util.oasys_util import write_surface_file, read_surface_file
from oasys.util.oasys_objects import OasysSurfaceData
from syned.beamline.optical_element import OpticalElement
from syned.widget.widget_decorato... | PypiClean |
/MPMSAnalyzer-0.1.15.tar.gz/MPMSAnalyzer-0.1.15/README.md | # MPMSAnalyzer
## Table of Contents
1. [Overview](#overview)
2. [Installation](#installation)
3. [Quickstart](#quickstart)
4. [Known Bugs](#known-bugs)
## Overview
MPMSAnalyzer is a program to increase information gain from Magnetic Property Measurement
System (SQUID) DC-Measurements (program written for MPMS 3 by... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas_blender/artists/polygonartist.py | from typing import Any
from typing import List
from typing import Optional
from typing import Union
import bpy
import compas_blender
from compas.artists import PrimitiveArtist
from compas.geometry import Polygon
from compas.colors import Color
from .artist import BlenderArtist
class PolygonArtist(BlenderArtist, Pri... | PypiClean |
/Cuckoo-2.0.7a1.tar.gz/Cuckoo-2.0.7a1/cuckoo/web/controllers/submission/api.py |
import json
from django.http import JsonResponse
from django.shortcuts import redirect
from django.views.decorators.http import require_http_methods
from cuckoo.common.config import config
from cuckoo.core.submit import SubmitManager
from cuckoo.web.utils import api_post, JsonSerialize, json_error_response
submit_m... | PypiClean |
/DiPAS-2.0.tar.gz/DiPAS-2.0/examples/external_optimizers/README.md | # Using external optimizers
The PyTorch package ships already with a [number of optimizers](https://pytorch.org/docs/stable/optim.html). These however are typically suited for problems with large parameter spaces (several hundred or more). For smaller problems other optimizers, e.g. the [Levenberg-Marquardt algorithm]... | PypiClean |
/KEL-GameEngine-0.0.12.2.tar.gz/KEL-GameEngine-0.0.12.2/KEL/Engine/Components/collidePolyComp.py | from KEL.Engine.Core import *
import math
import random
class CollidePolyComp:
def start(self):
self.myObj = KEL.currentObj.components['TransformPolyComp']
self.objects = KEL.getAllObject()
# See if it has a hitbox
for i in range(len(self.objects)):
if self.objects[i... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/admin/static/admin/js/SelectFilter2.js | (function($) {
function findForm(node) {
// returns the node of the form containing the given node
if (node.tagName.toLowerCase() != 'form') {
return findForm(node.parentNode);
}
return node;
}
window.SelectFilter = {
init: function(field_id, field_name, is_stacked, admin_static_prefix) {
... | PypiClean |
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/apex/apex/contrib/optimizers/fused_adam.py | import types
import torch
import importlib
from PMTD.maskrcnn_benchmark.apex.apex.multi_tensor_apply import multi_tensor_applier
class FusedAdam(torch.optim.Optimizer):
"""Implements Adam algorithm. Currently GPU-only. Requires Apex to be installed via
``python setup.py install --cuda_ext --cpp_ext``.
I... | PypiClean |
/mysmile-0.7.2.tar.gz/mysmile-0.7.2/docs/source/Technical Specifications/Content/PageParts.rst | Page parts
----------
.. tabularcolumns:: |p{3.7cm}|p{6.1cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|
.. list-table::
:header-rows: 1
* - Part name
- Description
- l18n
- Required
- Unique
* - Menu
- It is important to choose simple short name. It is used for menu.
- yes
- yes
- n... | PypiClean |
/Distutils2-1.0a4.tar.gz/Distutils2-1.0a4/distutils2/compiler/msvc9compiler.py | import os
import subprocess
import sys
import re
from distutils2.errors import (PackagingExecError, PackagingPlatformError,
CompileError, LibError, LinkError)
from distutils2.compiler.ccompiler import CCompiler
from distutils2.compiler import gen_lib_options
from distutils2 import logger... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap/site/content/docs/5.0/components/popovers.md | ---
layout: docs
title: Popovers
description: Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site.
group: components
toc: true
---
## Overview
Things to know when using the popover plugin:
- Popovers rely on the 3rd party library [Popper](https://popper.js.o... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/semver/classes/comparator.js | const ANY = Symbol('SemVer ANY')
// hoisted class for cyclic dependency
class Comparator {
static get ANY () {
return ANY
}
constructor (comp, options) {
options = parseOptions(options)
if (comp instanceof Comparator) {
if (comp.loose === !!options.loose) {
return comp
} else {
... | PypiClean |
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/RevitFamilyReload.py |
import clr
import System
clr.AddReference('System.Core')
clr.ImportExtensions(System.Linq)
clr.AddReference('System')
from System.Collections.Generic import List
# import common library
import RevitCommonAPI as com
import Utility as util
import Result as res
import RevitFamilyUtils as rFamUtil
import RevitFamilyLoa... | PypiClean |
/Catactor-0.1.2.tar.gz/Catactor-0.1.2/script/visualization/plot_raw_gene_auc.py | import numpy as np
import pickle
import sys
import seaborn as sns
import pandas as pd
# import pkg_resources
# pkg_resources.require("scanpy==1.3")
import scanpy as sc
print(sc.__version__)
import os
import scipy.stats
import scipy.sparse
import matplotlib.pyplot as plt
import sklearn.preprocessing
from sklearn.metrics... | PypiClean |
/DLMS_SPODES-0.40.11.tar.gz/DLMS_SPODES-0.40.11/src/DLMS_SPODES/cosem_interface_classes/association_ln/ver0.py | from enum import IntFlag, auto
from ... import ITE_exceptions as exc
from ..__class_init__ import *
from ...types import choices
from ...types.implementations import arrays, enums, bitstrings, long_unsigneds
from ...pdu_enums import AttributeAccess, MethodAccess
from ...enums import MechanismId
class AccessMode(cdt.E... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/ui/abstract_component.py | import re
from warnings import warn
from muntjac.event.method_event_source import IMethodEventSource
from muntjac.event.event_router import EventRouter
from muntjac.terminal.terminal import IErrorEvent as ITerminalErrorEvent
from muntjac.terminal.paintable import RepaintRequestEvent,\
IRepaintRequestListener
from... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/editor/plugins/StatusBar.js.uncompressed.js | define("dojox/editor/plugins/StatusBar", [
"dojo",
"dijit",
"dojox",
"dijit/_Widget",
"dijit/_TemplatedMixin",
"dijit/_editor/_Plugin",
"dojo/_base/connect",
"dojo/_base/declare",
"dojox/layout/ResizeHandle"
], function(dojo, dijit, dojox) {
dojo.experimental("dojox.editor.plugins.StatusBar");
dojo.declare("d... | PypiClean |
/BinToGene-1.23.tar.gz/BinToGene-1.23/README.md | <h2>BinToGene</h2>
Library to convert a cell-by-bin matrix to cell-by-gene, i.e., it replaces
the promoter accessibility with a gene activiy score.
This can be useful, for e.g., when one wishes to use existing gene expression
tools to a sc-ATAC-seq cell-by-bin matrix.</br></br>
The package uses a gencode file (v34) to... | PypiClean |
/NlpToolkit-Math-1.0.18.tar.gz/NlpToolkit-Math-1.0.18/Math/DiscreteDistribution.py | from __future__ import annotations
import collections
import math
class DiscreteDistribution(collections.OrderedDict):
__sum: float
def __init__(self, **kwargs):
"""
A constructor of DiscreteDistribution class which calls its super class.
"""
super().__init__(**kwargs)
... | PypiClean |
/CatLearn-0.6.2.tar.gz/CatLearn-0.6.2/catlearn/featurize/adsorbate_prep.py | import warnings
import numpy as np
from tqdm import tqdm
from ase.data import chemical_symbols
from ase.symbols import string2symbols, symbols2numbers
# get_distances requires ASE 3.16 or above.
from ase.geometry import get_layers, get_distances
from catlearn.api.ase_atoms_api import images_connectivity
from catlearn.f... | PypiClean |
/BaseExtensions-1.2.6.tar.gz/BaseExtensions-1.2.6/.github/CONTRIBUTING.md |
# Contributing
Thank you for your interest in contributing to TkinterExtensions! In this document, we'll outline what you need to know about contributing and how to get started.
## Code of Conduct
Please see our [Code of Conduct](CODE_OF_CONDUCT.md).
Third-party contributions are essential for the future developme... | PypiClean |
/KL_Audit_supportV1.8-1.0-py3-none-any.whl/AuditModule/core/applications/AuditManagement.py | import inspect
from AuditModule.core.applications import Annotations
from AuditModule.util import Logging as LOGG
from AuditModule.common import AppConstants
# from bin.util import CommonUtils
from AuditModule.core.applications import AuditManagementModules
from AuditModule.core.persistences import PersistenceAdaptor
i... | PypiClean |
/Mcdp-0.2.1.tar.gz/Mcdp-0.2.1/mcdp/aio_stream.py | import os
import ujson
import shutil
import asyncio
from pathlib import Path
from functools import partial, wraps
from aiofiles import open as aio_open
from typing import List, Optional, Union
from .counter import get_counter
counter = get_counter()
T_Path = Union[str, os.PathLike, Path]
def aio_future(func):
... | PypiClean |
/GraphLab_Create-2.1-cp27-none-macosx_10_5_x86_64.macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.macosx_10_11_intel.macosx_10_11_x86_64.whl/graphlab/toolkits/feature_engineering/_tokenizer.py | import graphlab as _gl
from graphlab.toolkits._model import _get_default_options_wrapper
from graphlab.toolkits.feature_engineering._feature_engineering import Transformer
from graphlab.toolkits._internal_utils import _toolkit_repr_print
from graphlab.toolkits._internal_utils import _precomputed_field
from graphlab.uti... | PypiClean |
/GCN4LP-0.1-py3-none-any.whl/src/util/define_optimizer.py | from torch import optim
def define_optimizer_adam(model, lr=1e-3, weight_decay=0, betas=(0.9, 0.999), eps=1e-8, amsgrad=False):
'''
define optimizer function adam
:param model:
:param lr:
:param weight_decay:
:param betas:
:param eps:
:param amsgrad:
:return:
'''
optimizer_a... | PypiClean |
/FlaskFarm-4.0.104-py3-none-any.whl/flaskfarm/lib/support/base/yaml.py | import os
import traceback
import yaml
from . import logger
class SupportYaml(object):
@classmethod
def write_yaml(cls, filepath, data):
with open(filepath, 'w', encoding='utf8') as f:
yaml.dump(data, f, default_flow_style=False, allow_unicode=True)
@classmethod
def read_yaml(se... | PypiClean |
/AADeepLearning-1.0.8.tar.gz/AAdeepLearning-1.0.8/develop/aa_dnn_mnist_batch_normalization.py | from aa_deep_learning.AADeepLearning import AADeepLearning
from aa_deep_learning.AADeepLearning.datasets import mnist
from aa_deep_learning.AADeepLearning.datasets import np_utils
# mnist数据集已经被划分成了60,000个训练集,10,000个测试集的形式,如果数据不存在则自动下载
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# 第一个维度是样本数目,第二维度是通道数表示颜色通... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/reading_import_profile_py3.py |
from msrest.serialization import Model
class ReadingImportProfile(Model):
"""ReadingImportProfile.
All required parameters must be populated in order to send to Azure.
:param channel_interval_in_seconds: The interval of the readings in
seconds
:type channel_interval_in_seconds: int
:param ... | PypiClean |
/AllenTools-0.1.1-py3-none-any.whl/allentools/security.py | from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from itsdangerous import BadSignature
import rsa
import base64
def generate_key(pubkey_file, privkey_file):
"""
生成密钥对
:return: (公钥对象, 私钥对象)
"""
# 生成密钥
pubkey, privkey = rsa.newkeys(1024)
# 保存密钥
with open(pubkey_file,... | PypiClean |
/ApplicationClientServer_server-0.1-py3-none-any.whl/server/remove_user.py | from PyQt5.QtWidgets import QDialog, QLabel, QComboBox, QPushButton, QApplication
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QStandardItemModel, QStandardItem
class DelUserDialog(QDialog):
'''
Класс - диалог выбора контакта для удаления.
'''
def __init__(self, database, server):
supe... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/fitbenchmarking/cost_func/nlls_base_cost_func.py | from abc import abstractmethod
from numpy import dot, matmul
from fitbenchmarking.cost_func.base_cost_func import CostFunc
class BaseNLLSCostFunc(CostFunc):
"""
This defines a base cost function for objectives of the type
.. math:: \\min_p \\sum_{i=1}^n r(y_i, x_i, p)^2
where :math:`p` is a vector... | PypiClean |
/HPI-0.3.20230327.tar.gz/HPI-0.3.20230327/my/location/fallback/via_home.py | from dataclasses import dataclass
from datetime import datetime, time, timezone
from functools import lru_cache
from typing import Sequence, Tuple, Union, cast, List, Iterator
from my.config import location as user_config
from my.location.common import LatLon, DateIsh
from my.location.fallback.common import FallbackL... | PypiClean |
/MacSAFER-1.3.tar.gz/MacSAFER-1.3/README.md | # Secure Plugin remover for macOS

## Description
This program removes any known malicious secure plugins installed from Korean E-Commerce, Government, Internet Banking websites. As those programs consume lots of resources on your ma... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/nn/fast_masked_linear.py |
from typing import Any, Tuple
from flax import linen as nn
from flax.linen.dtypes import promote_dtype
from jax import lax
from jax import numpy as jnp
from jax.nn.initializers import zeros
from netket.nn.masked_linear import (
MaskedConv1D,
MaskedConv2D,
MaskedDense1D,
_conv_dimension_numbers,
... | PypiClean |
/FP-SMC-ALS-test1-0.0.1.tar.gz/FP-SMC-ALS-test1-0.0.1/smc/elements/tags.py | from smc.base.model import Element
class IPListGroupTag(Element):
"""
IP List group tag elements cannot be created, only viewed.
"""
typeof = "ip_list_group"
class SpecificSoftwareTag(Element):
"""
Specific Software Tag elements cannot be created, only viewed.
"""
typeof = "applica... | PypiClean |
/FPGAflow-esdg-0.3.5.tar.gz/FPGAflow-esdg-0.3.5/fpgaflow/helpers/version.py | import customlogging as log
logger = log.config_logger(name=__name__)
def about(modname, ver, revision):
"""Method to Create an About String, to display Method Name and Version/Rev
Args:
modname (str): Module Name
ver (str): Version Number, in the form: ``MAJOR.MINOR.MICRO``
revision... | PypiClean |
/NREL-rex-0.2.84.tar.gz/NREL-rex-0.2.84/rex/utilities/cli_dtypes.py | import click
import logging
logger = logging.getLogger(__name__)
def sanitize_str(value, subs=('slice', '=', '(', ')', ' ')):
"""Sanitize characters from string."""
for s in subs:
value = value.replace(s, '')
return value
class IntType(click.ParamType):
"""Integer click input argument type... | PypiClean |
/FreeGS-0.8.0-py3-none-any.whl/freegs/multi_coil.py | import numpy as np
from .coil import Coil, AreaCurrentLimit
from .gradshafranov import Greens, GreensBr, GreensBz
class MultiCoil(Coil):
"""
This class is multifunctional and can model several coil arrangements:
1. A single PF coil
2. A block of several PF coil filaments, modelled as
a) a sing... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/models/ssd_mobiledet_feature_extractor.py | """SSDFeatureExtractor for MobileDet features."""
import functools
import numpy as np
import tensorflow.compat.v1 as tf
import tf_slim as slim
from object_detection.meta_architectures import ssd_meta_arch
from object_detection.models import feature_map_generators
from object_detection.utils import ops
from object_det... | PypiClean |
/DLNValidation-0.3.1.tar.gz/DLNValidation-0.3.1/README.txt | =============
DLNValidation
=============
A python library for validation of USA drivers license numbers.
Dl-number-validation validates if a drivers license is a valid format for the two letter postal code for the state.
Formats are defined by http://www.deverusdemos.com/Help/FlashHelp/Search_Types/Formats_for_MVR_l... | PypiClean |
/BiGa_distributions-1.2.tar.gz/BiGa_distributions-1.2/BiGa_distributions/Gaussiandistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
# Gaussian class inherits Distribution class from generalDistribution file
class Gaussian(Distribution):
""" Gaussian distribution class for calculating and
visualizing a Gaussian distribution.
Attributes:
mean (float) r... | PypiClean |
/ContFrac-1.0.0.tar.gz/ContFrac-1.0.0/contfrac.py | import fractions
import typing
__VERSION__ = '1.0.0'
def continued_fraction(x, maxlen=30):
"""Computes the continued fraction of a number ``x`` expressed in many
types, including floats, tuples and Fractions, generating the coefficients
iteratively.
The result for a number ``x`` will be the sequence... | PypiClean |
/Flask-Prose-0.1.56.tar.gz/Flask-Prose-0.1.56/README.md | # flask prose
flask prose is an extension to generate various kinds of prose from a corpus of text.
basically you upload a largish text file with unique text and out comes prose.
from there you can explore the how composed text can be expressed as randomized prose.
the extention exposes a set of endpoints that can ... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/addon/csstools/render_info.py |
class RenderInfo(object):
"""Class for fetching render information from the client side widgets.
@author: jouni@vaadin.com
@author: Richard Lincoln
"""
@classmethod
def get(cls, c, cb, *props):
"""Initiate a request to get the render information for a given component.
The in... | PypiClean |
/BaiduSpider-1.0.2.6.tar.gz/BaiduSpider-1.0.2.6/baiduspider/mobile/models/web.py | from datetime import time
from typing import Dict
from baiduspider.util import convert_time
from baiduspider.mobile.models.typings.typings_web import *
class WebVideoDetail(WebVideoDetail):
"""视频详情搜索结果模型
这是一个遵照BaiduSpider移动端网页搜索视频详情搜索结果结果模型创建的返回模型类。
Attributes:
author (str): 搜索结果作者(来源)
... | PypiClean |
/gwydion-0.1.zip/gwydion-0.1/gwydion/funcs/polynomial.py | from gwydion.base import np, Base
from gwydion.exceptions import GwydionError
class Polynomial(Base):
"""
Polynomial function. Returned function is
y = a[0] + a[1]*x + a[2]*x**2 + ... + a[n]*x**n
Parameters
----------
N : Integer.
Length of arrays to be returned via the data met... | PypiClean |
/Ibid-0.1.1.tar.gz/Ibid-0.1.1/docs/configuration.rst | .. _configuration:
Configuration
=============
.. _botdir:
The botdir
----------
Every Ibid lives in a directory, the botdir.
This holds the configuration file, logs, caches, the SQLite database if
you are using it, and plugins you've written.
The botdir should be your current directory whenever you run an
ibid-re... | PypiClean |
/DuelistAlgorithmPython-1.0-py3-none-any.whl/examples/2_solve_multivariate.py | from solver.Duelist_Algorithm import DuelistAlgorithm
'''
EXAMPLE 2
Multivariate optimization is demonstrated by using a squared equation with two variables
'''
'''
Here we have a simple squared equation that we want to optimize (minimize).
The equation is y=(x1)^2+(x2)^2
x1 is bounded from -2 to 10 (-2 is min v... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/view/widgets/SquidStageScanWidget.py | import pyqtgraph as pg
from qtpy import QtCore, QtWidgets
from imswitch.imcommon.view.guitools import pyqtgraphtools
from imswitch.imcontrol.view import guitools
from .basewidgets import NapariHybridWidget
class SquidStageScanWidget(NapariHybridWidget):
""" Displays the SquidStageScan transform of the image. """... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/44594.121b93e110a90df96e70.min.js | "use strict";(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[44594],{99528:function(A,n,e){var t=e(87537),o=e.n(t),r=e(23645),l=e.n(r),s=e(61667),a=e.n(s),i=new URL(e(58285),e.b),c=new URL(e(17747),e.b),u=new URL(e(96195),e.b),g=new URL(e(7489),e.b),h=new URL(e(49060),e.... | PypiClean |
/bareon-0.0.1a3.tar.gz/bareon-0.0.1a3/bareon/drivers/deploy/mixins.py |
import os
from contextlib import contextmanager
from bareon import errors
from bareon.openstack.common import log as logging
from bareon.utils import fs as fu
from bareon.utils import partition as pu
from bareon.utils import utils
LOG = logging.getLogger(__name__)
class MountableMixin(object):
def _mount_tar... | PypiClean |
/CDS-1.0.1.tar.gz/CDS-1.0.1/cds/modules/records/serializers/schemas/datacite.py | from __future__ import absolute_import, print_function
import arrow
from marshmallow import Schema, fields
class IdentifierSchema(Schema):
"""Identifier schema."""
identifier = fields.Function(lambda o: o)
identifierType = fields.Constant('DOI')
class TitleSchema(Schema):
"""Title schema."""
... | 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/autocomplete_rule_group_array.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 |
/DTMC/spatialModel/PeriodicMovement/periodicSIRSDV.py | import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from math import cos, sin, pi
from ..randomMovement.randMoveSIRSDV import RandMoveSIRSDV
from Eir.DTMC.spatialModel.simul_details import Simul_Details
from Eir.utility import Person2 as Person
from Eir.utility import randEvent, dist
class Pe... | PypiClean |
/Mopidy-Mopify-1.7.3.tar.gz/Mopidy-Mopify-1.7.3/mopidy_mopify/static/debug/src/app/account/services/spotify/spotify.controller.js | 'use strict';
angular.module('mopify.account.services.spotify', [
'spotify',
'mopify.services.servicemanager',
'mopify.services.spotifylogin',
'mopify.services.settings',
'toggle-switch'
]).config([
'$routeProvider',
function ($routeProvider) {
$routeProvider.when('/account/services/spotify', {
... | PypiClean |
/IntsightsTaco-0.0.1.tar.gz/IntsightsTaco-0.0.1/taco/aws_wrappers/dynamodb_wrapper/consts.py | from collections import namedtuple
from enum import Enum
import taco.boto3.boto_config
DEFAULT_REGION = taco.boto3.boto_config.DEFAULT_REGION
DIMENSION_TEMPLATE = 'dynamodb:table:{0}'
class CapacitiesArgs(Enum):
read = 'ReadCapacityUnits'
write = 'WriteCapacityUnits'
READ_DIMENSION = DIMENSION_TEMPLATE.f... | PypiClean |
/KalaPy-0.4.2.tar.gz/KalaPy-0.4.2/kalapy/db/engines/__init__.py | import os
from werkzeug import import_string
from werkzeug.local import LocalStack
from kalapy.conf import settings, ConfigError
from kalapy.core import signals
__all__ = ('Database', 'DatabaseError', 'IntegrityError', 'database')
if not settings.DATABASE_ENGINE:
settings.DATABASE_ENGINE = 'dummy'
engine = s... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/widgets/unsupervised/owdistancemap.py | import sys
import itertools
from functools import reduce
from operator import iadd
import numpy
from AnyQt.QtWidgets import (
QFormLayout, QGraphicsRectItem, QGraphicsGridLayout, QGraphicsWidget,
QApplication
)
from AnyQt.QtGui import (
QFontMetrics, QPen, QIcon, QPixmap, QLinearGradient, QPainter, QColor... | PypiClean |
/Flask_Uploader-0.2.0-py3-none-any.whl/flask_uploader/formats.py | from __future__ import annotations
import typing as t
import mimetypes
from .utils import get_extension
__all__ = (
'get_format',
'guess_type',
'FileFormat',
)
class FileFormat(t.NamedTuple):
extension: str
mimetype: str
comment: str = ''
TXT = FileFormat('txt', 'text/plain')
# MS Offi... | PypiClean |
/Colonyzer2-1.1.22.tar.gz/Colonyzer2-1.1.22/scripts/parametryzer.py | import pygame
from pygame.locals import *
import os,sys,time
# Let's find what directory we're in
#syspath = os.path.dirname(sys.argv[0])
#fullpath = os.path.abspath(syspath)
fullpath=os.getcwd()
useRoot=False
filelist=[]
rootdict={}
allfiles=os.listdir(fullpath)
for filename in allfiles:
if len(filename)>4 and ... | PypiClean |
/ConSSL-0.0.1-py3-none-any.whl/CSSL/models/self_supervised/moco/transforms.py | import random
from CSSL.transforms.dataset_normalizations import (
cifar10_normalization,
imagenet_normalization,
stl10_normalization,
)
from CSSL.utils import _PIL_AVAILABLE, _TORCHVISION_AVAILABLE
from CSSL.utils.warnings import warn_missing_pkg
if _TORCHVISION_AVAILABLE:
from torchvision import tra... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/model/interfaces/thorlabs_tsi_sdk/tl_color_enums.py | from enum import IntEnum
class __CTypesEnum(IntEnum):
@classmethod
def from_param(cls, obj):
return int(obj)
class FILTER_ARRAY_PHASE(__CTypesEnum):
"""
The FILTER_ARRAY_PHASE enumeration lists all the possible values that a pixel in a Bayer pattern color arrangement
could assume.
... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/trans/feeds.py |
from django.conf import settings
from django.contrib.syndication.views import Feed
from django.shortcuts import get_object_or_404
from django.urls import reverse
from django.utils.translation import gettext as _
from weblate.lang.models import Language
from weblate.trans.models import Change
from weblate.utils.views ... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/admin/static/admin/js/admin/RelatedObjectLookups.js | 'use strict';
{
const $ = django.jQuery;
let popupIndex = 0;
const relatedWindows = [];
function dismissChildPopups() {
relatedWindows.forEach(function(win) {
if(!win.closed) {
win.dismissChildPopups();
win.close();
}
});
}... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/labelme/config/__init__.py | import os.path as osp
import shutil
import yaml
from labelme.logger import logger
here = osp.dirname(osp.abspath(__file__))
def update_dict(target_dict, new_dict, validate_item=None):
for key, value in new_dict.items():
if validate_item:
validate_item(key, value)
if key not in targ... | PypiClean |
/Flask-SQL-Pro-4.3.tar.gz/Flask-SQL-Pro-4.3/flask_sql_pro/sql_loader.py | import os
import threading
import typing
import yaml
import jinja2
class GlobalData:
sql_group = {}
class Loader:
loader = None
class SingletonType(type):
_instance_lock = threading.Lock()
def __call__(cls, *args, **kwargs):
if not hasattr(cls, "_instance"):
with SingletonTyp... | PypiClean |
/DMT_core-2.0.0-py3-none-any.whl/DMT/core/dut_type.py | import warnings
from enum import Flag, auto, unique
class DutTypeInt(object):
"""Class for DutType flags. Adds the nodes attribute to an integer value. This allows direct assignment of nodes to a DutType.
Parameters
----------
value : int
node : [str]
List of nodes.
"""
def __in... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/ext-language_tools.js | ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
"use strict";
var oop = require("./lib/oop");
var EventEmitter = require("./... | PypiClean |
/IHEWAcollect-0.0.31.tar.gz/IHEWAcollect-0.0.31/ci/travis_gdal_install.sh | set -e
########################################
# PROJ
########################################
# Create build dir if not exists
if [ ! -d "$PROJBUILD" ]; then
mkdir $PROJBUILD;
fi
if [ ! -d "$PROJINST" ]; then
mkdir $PROJINST;
fi
ls -l $PROJINST
echo "PROJ VERSION: $PROJVERSION"
if [ ! -d "$PROJINST/gdal-$GDA... | PypiClean |
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/controllers/feed.py | import logging
from beaker.cache import cache_region
from tg import response
from tg import tmpl_context as c
from tg.i18n import ugettext as _
import kallithea
import kallithea.lib.helpers as h
from kallithea.controllers import base
from kallithea.lib import feeds, webutils
from kallithea.lib.auth import HasRepoPerm... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/pilot/coordination/nocoord_adaptor.py | import logging
import json
import pdb
from pilot import *
from bigjob import logger
from saga import Url as SAGAUrl
class NoCoordinationAdaptor:
"""
Dummy Adaptor - No distributed coordination done
"""
BASE_URL="nocoord://localhost/"
BASE_URL_QUERY_STRING="?dbtype=sqlite3"
PILOT_PATH... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/libs/jquery.form.min.js | !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery.min"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submi... | PypiClean |
/Brain-Brew-0.3.10.tar.gz/Brain-Brew-0.3.10/brain_brew/representation/yaml/note_model_template.py | import os
from dataclasses import dataclass, field
from typing import Optional, Union, Set
from brain_brew.configuration.anki_field import AnkiField
from brain_brew.configuration.representation_base import RepresentationBase
from brain_brew.interfaces.yamale_verifyable import YamlRepr
from brain_brew.representation.ge... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_en-im.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/Flask-Assistant-0.5.4.tar.gz/Flask-Assistant-0.5.4/api_ai/cli.py | from __future__ import absolute_import
import sys
import logging
from flask_assistant.utils import get_assistant
from .schema_handlers import IntentGenerator, EntityGenerator, TemplateCreator
from .api import ApiAi
from . import logger
from multiprocessing import Process
logger.setLevel(logging.INFO)
api = ApiAi()
r... | PypiClean |
/2vyper-0.3.0.tar.gz/2vyper-0.3.0/src/twovyper/translation/arithmetic.py | from typing import List
from twovyper.ast import ast_nodes as ast, names, types
from twovyper.ast.types import PrimitiveType, BoundedType
from twovyper.translation import helpers
from twovyper.translation.abstract import CommonTranslator
from twovyper.translation.context import Context
from twovyper.utils import swi... | PypiClean |
/Findex_GUI-0.2.18-py3-none-any.whl/findex_gui/static/js/highlight.min.js | !function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/[&<>]/gm,function(e){return R[e]})}function r(e){return e.node... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/cookie-law-info/cookie-law-info-public.js | CLI_ACCEPT_COOKIE_NAME =(typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
CLI_ACCEPT_COOKIE_EXPIRE =(typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
CLI_COOKIEBAR_AS_POPUP=(typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_A... | PypiClean |
/KPyGithub-1.32a1.tar.gz/KPyGithub-1.32a1/github/GitTree.py |
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | PypiClean |
/OTSun-2.10.6.tar.gz/OTSun-2.10.6/otsun/outputs.py | import numpy as np
def spectrum_to_constant_step(file_in, wavelength_step, wavelength_min, wavelength_max):
data_array = np.loadtxt(file_in, usecols=(0, 1))
wl_spectrum = data_array[:, 0]
I_spectrum = data_array[:, 1]
array_inter = [[x, np.interp(x, wl_spectrum, I_spectrum)] for x in
... | PypiClean |
/Flask-Select2-0.1.tar.gz/Flask-Select2-0.1/flask_select2/model/fields.py | __author__ = 'Paul Cunningham'
__copyright = 'Copyright 2017, Paul Cunningham'
from wtforms import SelectFieldBase, ValidationError
from .widgets import AjaxSelect2Widget
class AjaxSelectField(SelectFieldBase):
"""
Ajax Model Select Field
"""
widget = AjaxSelect2Widget()
separator = ','
... | PypiClean |
/MatchZoo-2.2.0.tar.gz/MatchZoo-2.2.0/matchzoo/metrics/discounted_cumulative_gain.py | import math
import numpy as np
from matchzoo.engine.base_metric import BaseMetric, sort_and_couple
class DiscountedCumulativeGain(BaseMetric):
"""Disconunted cumulative gain metric."""
ALIAS = ['discounted_cumulative_gain', 'dcg']
def __init__(self, k: int = 1, threshold: float = 0.):
"""
... | PypiClean |
/MRedis-0.2.tar.gz/MRedis-0.2/mredis/badge.py |
# @Time : 2019/4/14 4:00 PM
# @Author : George
# @File : badge.py
# @Contact : georgewang1994@163.com
class BadgeManager(object):
"""
badge管理
"""
def __init__(self, database, basic_cache_key, expire_time=60 * 60):
self.database = database
self.basic_cache_key = basic_cache_key
... | PypiClean |
/braid-0.1.tar.gz/braid-0.1/braid/berryflow/data_manager/vanilla_generator.py | from __future__ import absolute_import
import tensorflow as tf
import numpy as np
import time
from math import floor, ceil
from ..misc import print_msg
from .preprocessing import (create_fixed_image_shape, one_hot)
class VanillaGenerator(object):
""" Read image-label data from lmdb database and feed mini-batches ... | PypiClean |
/EMCqMRI-1.1.11.tar.gz/EMCqMRI-1.1.11/README.md | # **EMCqMRI**
The EMCqMRI is a PyTorch-based package designed with the goal to accelerate initial developments in the field of quantitative MRI (qMRI).
It provides the base classes for the implementation of task-specific custom modules and offers a framework for training Deep Learning inference models and prediction ... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/optimizations/FunctionInlining.py | from nuitka.nodes.OutlineNodes import ExpressionOutlineBody
from nuitka.nodes.VariableAssignNodes import makeStatementAssignmentVariable
from nuitka.nodes.VariableReleaseNodes import makeStatementReleaseVariable
from nuitka.tree.Operations import VisitorNoopMixin, visitTree
from nuitka.tree.ReformulationTryFinallyState... | PypiClean |
/Flask-phpBB3-0.2.1.tar.gz/Flask-phpBB3-0.2.1/README.rst | Flask-phpBB3
============
Connector for Flask with phpBB3. Do note, this connector does not use any caches
and is *read-only*.
Supported drivers
-----------------
* Direct access
+ psycopg2 - direct access to PostgreSQL
Supported phpBB3 versions
-------------------------
* 3.1.x
Configuration
-----------... | PypiClean |
/JacksonQuery-0.0.1-py3-none-any.whl/jacksonquery/classification_schema.py | import os
import pandas as pd
import numpy as np
from tqdm import tqdm
from bs4 import BeautifulSoup
def morningstar_category(str_list, sub_acct):
"""
Returns the Morningstar Category for a given subaccount.
:param str_list: (list) List of strings from the Morningstar page.
:param sub_acct: (str) Sub... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.