id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Clinamen2-2023.5.1.tar.gz/Clinamen2-2023.5.1/clinamen2/cmaes/params_and_state.py | from dataclasses import dataclass
from typing import Callable, Optional, Tuple, Union
import numpy as np
import numpy.typing as npt
import scipy as sp
import scipy.stats
from scipy.linalg import solve_triangular
from clinamen2.runner.basic_runner import Runner, WorkerResult
@dataclass(frozen=True)
class AlgorithmPa... | PypiClean |
/CustomPipeline-0.0.3-py3-none-any.whl/rpcore/gui/labeled_checkbox.py | from panda3d.core import Vec3
import direct.gui.DirectGuiGlobals as DGG
from rpcore.rpobject import RPObject
from rpcore.gui.checkbox import Checkbox
from rpcore.gui.text import Text
class LabeledCheckbox(RPObject):
""" This is a checkbox, combined with a label. The arguments are
equal to the Checkbox and O... | PypiClean |
/LimeReport-qt-6-4-1.7.5.tar.gz/LimeReport-qt-6-4-1.7.5/LimeReport/3rdparty/zint-2.10.0/README | Zint and libzint
----------------
Zint is a suite of programs to allow easy encoding of data in any of the
wide range of public domain barcode standards and to allow integration of
this capability into your own programs.
Zint is able to encode data in the following formats:
Code 11, Standard Code 2 of 5, IATA Code 2 ... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/inception_v3.py | """Contains the definition for inception v3 classification network."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v1 as tf
import tf_slim as slim
from nets import inception_utils
# pylint: disable=g-long-lambda
trunc_normal =... | PypiClean |
/MP3AlbumCheck-1.tar.gz/MP3AlbumCheck-1/mp3albumcheck/cli.py | import sys, os, eyeD3
import optparse
from cddb import cddbsearch
def main():
parser = optparse.OptionParser()
parser.add_option('-t', '--tag', help='tag results', dest='tag', default=False, action='store_true')
parser.add_option('-d', '--dir', help='directory of mp3s', dest='dir', default=False, action='... | PypiClean |
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/oldanki/graphs.py | __docformat__ = 'restructuredtext'
import os, sys, time
import oldanki.stats
from oldanki.lang import _
import datetime
#colours for graphs
dueYoungC = "#ffb380"
dueMatureC = "#ff5555"
dueCumulC = "#ff8080"
reviewNewC = "#80ccff"
reviewYoungC = "#3377ff"
reviewMatureC = "#0000ff"
reviewTimeC = "#0fcaff"
easesNewC ... | PypiClean |
/ModelSEEDpy-freiburgermsu-0.3.1.4.tar.gz/ModelSEEDpy-freiburgermsu-0.3.1.4/modelseedpy_freiburgermsu/core/msmedia.py | import logging
from cobra.core.dictlist import DictList
from modelseedpy_freiburgermsu.core.msmodelutl import MSModelUtil
logger = logging.getLogger(__name__)
class MediaCompound:
def __init__(self, compound_id, lower_bound, upper_bound, concentration=None):
self.id = compound_id
self.lower_bound... | PypiClean |
/Feature_Analysis-0.0.4.tar.gz/Feature_Analysis-0.0.4/README.md | # Feature Analysis: Simple Feature Analysis in Python
It performs feature analysis for data preprocessing or usage of data in Machine Learning.
# Methods
There are four methods used to identify features to remove:
1. Finding Missing Values (find_missing(missing_threshold))
%% Find the features with a fraction o... | PypiClean |
/CoSA-0.3.0.tar.gz/CoSA-0.3.0/cosa/analyzers/bmc_temporal.py |
import re
import math
from pysmt.shortcuts import BV, And, Or, Solver, TRUE, FALSE, Not, EqualsOrIff, Implies, Iff, Symbol, BOOL, simplify, BVAdd, BVUGE
from pysmt.smtlib.printers import SmtPrinter, SmtDagPrinter
from pysmt.typing import BOOL
from cosa.utils.logger import Logger
from cosa.utils.formula_mngm import s... | PypiClean |
/Koi_Language-2.0.0-py3-none-any.whl/src/koi/resolver.py | from collections import deque
from typing import Deque, Dict
from .types import StringType
from .interpreter import Interpreter
from .tokens import Token
from .expr import (
Assign,
Binary,
Call,
Expr,
ExprVisitor,
Get,
Grouping,
Literal,
Logical,
Set,
Super,
This,
... | PypiClean |
/Loupe-1.2.0-py3-none-any.whl/loupe/fourier.py | import functools
import numpy as np
from numpy.lib.stride_tricks import as_strided
import loupe
class fft2(loupe.core.Function):
def __init__(self, input):
self.input = loupe.asarray(input)
super().__init__(self.input)
def forward(self):
return np.fft.fft2(self.input.data)
def ... | PypiClean |
/EuroPython2006_PyQt4_Examples-1.0.zip/EuroPython2006_PyQt4_Examples-1.0/Custom Widgets/Qt Examples/wiggly.py |
#############################################################################
##
## Copyright (C) 2004-2006 Trolltech ASA. All rights reserved.
##
## This file is part of the example classes of the Qt Toolkit.
##
## This file may be used under the terms of the GNU General Public
## License version 2.0 as published by ... | PypiClean |
/BigchainDBNext-2.2.2.1.tar.gz/BigchainDBNext-2.2.2.1/bigchaindb/tendermint_utils.py |
import base64
import hashlib
import json
from binascii import hexlify
try:
from hashlib import sha3_256
except ImportError:
from sha3 import sha3_256
def encode_transaction(value):
"""Encode a transaction (dict) to Base64."""
return base64.b64encode(json.dumps(value).encode('utf8')).decode('utf8')
... | PypiClean |
/GenMotion-0.0.4-py3-none-any.whl/genmotion/render/maya/utils.py |
import socket
# socket client controller
class MayaController:
"""
This is controller to `remotely` control Maya to make character animations.
The default local host is *127.0.0.1*
:param PORT: port to connect to the local socket server, defaults to 0
:type PORT: int
:ivar client: socket c... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/utils/http_errors.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)"
from django.http import HttpResponse
def error(values):
... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/html/styles.js.uncompressed.js | define("dojox/html/styles", ["dojo/_base/lang", "dojo/_base/array", "dojo/_base/window", "dojo/_base/sniff"],
function(lang, ArrayUtil, Window, has) {
// summary:
// Methods for creating and manipulating dynamic CSS Styles and Style Sheets
//
// example:
// | dojox.html.createStyle("#myDiv input", "font-size:2... | PypiClean |
/BaiduSpider-1.0.2.6.tar.gz/BaiduSpider-1.0.2.6/baiduspider/__init__.py | import datetime
import hashlib
import random
import time as time_lib
from typing import Dict, Tuple, Union
from urllib.parse import quote
from baiduspider._spider import BaseSpider
from baiduspider.models.baike import BaikeResult
from baiduspider.models.jingyan import JingyanResult
from baiduspider.models.news import ... | PypiClean |
/FTP_MU-0.0.tar.gz/FTP_MU-0.0/FTP_MU/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 |
/dipex-4.54.5.tar.gz/dipex-4.54.5/integrations/aarhus/config.py | from typing import Any
from typing import Dict
from typing import Optional
from uuid import UUID
import uuids
from pydantic import BaseSettings
from ra_utils.job_settings import JobSettings
from ra_utils.load_settings import load_settings
from raclients.graph.client import GraphQLClient
def json_config_settings_sour... | PypiClean |
/OctoPyClient-1.0.2.tar.gz/OctoPyClient-1.0.2/octopyclient/panels/control.py |
from octopyclient.common import CommonPanel, Singleton
from octopyclient.utils import *
from octopyclient.igtk import *
controls = [{'name':'Motors Off', 'icon':'motor-off', 'command':'M18'},
{'name':'Fan On', 'icon':'fan-on', 'command':'M106'},
{'name':'Fan Off', 'icon':'fan-off', 'command':'... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/utils/StdoutContext.py | from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2014, University of Oxford"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import sys
from utils.py3porting import is_... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/whatwg-url/README.md | # whatwg-url
whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/). It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like [jsdom](https://github.com/tmpvar/jsdom).
## Current Status
wh... | PypiClean |
/Mopidy_MFE-0.4.9.tar.gz/Mopidy_MFE-0.4.9/mopidy_mfe/www/services/cacheService.js | angular.module('mopidyFE.cache', [])
.factory('cacheservice', function($q, $location) {
var cacheVersion = "0.4.5";
var sCacheMax = 10; // max number or entries for each cache
var iCacheMax = 20;
var bCacheMax = 20;
var recentMax = 20;
var favsMax = 600;
var imgMax = 600;
ls=window.localStorage
//ls.clea... | PypiClean |
/Craft_xai-0.0.3-py3-none-any.whl/craft/craft_torch.py | from abc import ABC, abstractmethod
from math import ceil
from typing import Callable, Optional
import torch
import numpy as np
from sklearn.decomposition import NMF
from sklearn.exceptions import NotFittedError
from .sobol.sampler import HaltonSequence
from .sobol.estimators import JansenEstimator
def torch_to_num... | PypiClean |
/IVisual-0.2.88.zip/IVisual-0.2.88/ivisual/data/pako_inflate.min.js | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.pako=e()}}(function(){return function e(t,i,n){function... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/lorem/en_US/__init__.py | from typing import Dict
from .. import Provider as LoremProvider
class Provider(LoremProvider):
"""Implement lorem provider for ``en_US`` locale.
Word list is based on the source(s) below, and some words have been removed
to make the word list appropriate for public testing.
Sources:
- https:/... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/theme-tomorrow_night.js | ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night";
exports.cssText = ".ace-tomorrow-night .ace_gutter {\
background: #25282c;\
color: #C5C8C6\
}\
.ace-tomorrow-night .ace_print-margin {... | PypiClean |
/NeuroUnits-0.1.2.tar.gz/NeuroUnits-0.1.2/src/neurounits/visitors/common/function_expander.py | from neurounits.visitors import ASTVisitorBase
import neurounits.ast as ast
from neurounits.visitors.bases.base_actioner_default_ignoremissing import ASTActionerDefaultIgnoreMissing
class _FunctionCloner(ASTVisitorBase):
def __init__(self, functiondef_instantiation):
#print '\n\n'
self.fun... | PypiClean |
/Mopidy-MusicBox-Webclient-3.1.0.tar.gz/Mopidy-MusicBox-Webclient-3.1.0/mopidy_musicbox_webclient/static/vendors/jquery/jquery-1.12.0.min.js | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c... | PypiClean |
/HiCExplorer-2.2.1.1-py3-none-any.whl/hicexplorer/hicBuildMatrix.py | from __future__ import division
import argparse
import numpy as np
from scipy.sparse import coo_matrix, dia_matrix
import time
from os import unlink
import os
import warnings
warnings.simplefilter(action="ignore", category=RuntimeWarning)
warnings.simplefilter(action="ignore", category=PendingDeprecationWarning)
# imp... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/plugins/drawing/GreekPalette.js.uncompressed.js | define("dojox/drawing/plugins/drawing/GreekPalette", ["dijit","dojo","dojox","dojo/i18n!dojox/editor/plugins/nls/latinEntities","dojo/require!dojox/drawing/library/greek,dijit/focus,dijit/_Widget,dijit/_TemplatedMixin,dijit/_PaletteMixin,dojo/i18n"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.plugins.drawi... | PypiClean |
/Hector_Observations_Pipeline-1.4-py3-none-any.whl/hop/distortion_correction/HectorTranslationSoftware/Packages/cfitsio/README.win | Instructions on building and using CFITSIO on Windows platforms
for C programmers using Microsoft Visual Studio or Borland C++.
These instructions for building the CFITSIO library under Windows use the
CMake build system that is available from http://www.cmake.org.
===================================================... | PypiClean |
/Colr-0.9.1.tar.gz/Colr-0.9.1/colr/progress_frames.py | from collections import namedtuple
from functools import total_ordering
from .colr import Colr as C
# Argument set for `range` in `BarSet._generate_move`.
RangeMoveArgs = namedtuple('RangeMoveArgs', ('forward', 'backward'))
def cls_get_by_name(cls, name):
""" Return a class attribute by searching the attribute... | PypiClean |
/MITgcm_recipes-0.1.tar.gz/MITgcm_recipes-0.1/MITgcm_recipes/plotting.py | import matplotlib.pylab as _plt
import numpy as _np
import cartopy as _cart
from matplotlib import colors as _colors
from matplotlib import cm
import xarray as _xr
#from gridfill import fill as _fill # py2.7 !
from .data_organization import *
# plot ASTE on the best possible projection
def plot_ASTE(dataarray, dict_p... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/auth/models.py | from django.contrib import auth
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.core.mail import send_mail
from django.db import models
from django.db.models.manager imp... | PypiClean |
/OBB_Maya-0.1.15.zip/OBB_Maya-0.1.15/OBB/shelf/__init__.py | import os
from maya import mel
from maya import cmds
from PySide import QtGui
from functools import partial
from collections import OrderedDict
this_package = os.path.abspath(os.path.dirname(__file__))
shelf_path = partial(os.path.join, this_package)
buttons = OrderedDict({
'OBB_BoundingBox': {
'command':... | PypiClean |
/Oasys-Canvas-Core-1.0.7.tar.gz/Oasys-Canvas-Core-1.0.7/orangecanvas/document/quickmenu.py | import sys
import logging
from collections import namedtuple, Callable
import six
import numpy
from PyQt5.QtWidgets import (
QWidget, QFrame, QToolButton, QAbstractButton, QAction, QTreeView,
QButtonGroup, QStackedWidget, QHBoxLayout, QVBoxLayout, QSizePolicy,
QStyleOptionToolButton,
QStylePainter, ... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/radio-group.js | module.exports =
/******/ (function (modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in ... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/LabExT/transformations.py | import logging
import numpy as np
from LabExT import rmsd
class Transformation2D:
"""This class performs a 2D coordinate transformation, taking into account
rotation and translation using the rmsd plugin.
"""
def __init__(self, mover):
"""Constructor. Initialises local variables.
P... | PypiClean |
/Django_Linked_Select2-0.7.1-py3-none-any.whl/Django_Linked_Select2-0.7.1.dist-info/DESCRIPTION.rst | Django-Linked-Select2
=====
Django-Linked-Select2 is an extension to
[Django-Select2](https://github.com/applegrew/django-select2/),
which allows to create some simple inter-widget dependencies, like limiting choices of one widget based on value of other widget or even querying instances of specific model for generic ... | PypiClean |
/Django-G11N-1.1.0.1.tar.gz/Django-G11N-1.1.0.1/django_g11n/tools/region.py | URL = "http://unstats.un.org/unsd/methods/m49/m49regin.htm"
HASH = "40f5450a6386f90414d5233c9fcc5163"
# Two codes, the left code is the parent, the right the child.
DATA = """
001 World
002 Africa
019 Americas
142 Asia
150 Europe
009 Oceania
002 Africa
014 Eastern Africa
017 Middle Africa
015... | PypiClean |
/C-Telethon-1.28.5.tar.gz/C-Telethon-1.28.5/telethon/client/dialogs.py | import asyncio
import inspect
import itertools
import typing
from .. import helpers, utils, hints, errors
from ..requestiter import RequestIter
from ..tl import types, functions, custom
_MAX_CHUNK_SIZE = 100
if typing.TYPE_CHECKING:
from .telegramclient import TelegramClient
def _dialog_message_key(peer, messa... | PypiClean |
/JLpy_utils_package-2.0.5-py3-none-any.whl/JLpy_utils_package/JL_ML_models/JL_ML_preprocessing/JL_ML_LabelEncode.py | class categorical_features():
"""
LabelEncode non-numeric categorical features. Unlike in sklearns default encoder, this class ensures missing values can be handled when transforming an arbitrary dataset.
Arguments:
---------
verbose: int. Default: 0. higher implies more prints
"""
def _... | PypiClean |
/IPFX-1.0.8.tar.gz/IPFX-1.0.8/ipfx/lims_queries.py | import os
import logging
import pg8000
from allensdk.core.authentication import credential_injector
from allensdk.core.auth_config import LIMS_DB_CREDENTIAL_MAP
from ipfx.string_utils import to_str
TIMEOUT = os.environ.get(
"IPFX_LIMS_TIMEOUT",
os.environ.get(
"IPFX_TEST_TIMEOUT",
None
)... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/html5lib/treebuilders/base.py | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from ..constants import scopingElements, tableInsertModeElements, namespaces
# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are used to prevent for... | PypiClean |
/DNBC4-test-2.2.1.tar.gz/DNBC4-test-2.2.1/dnbc4tools/atac/decon.py | import os
import argparse
from typing import List, Dict
from dnbc4tools.tools.utils import str_mkdir,judgeFilexits,change_path,logging_call,read_json
from dnbc4tools.__init__ import __root_dir__
class Decon:
def __init__(self, args: Dict):
"""
Constructor for Decon class.
Args:
- a... | PypiClean |
/CosmoTech-SupplyChain-5.1.0.tar.gz/CosmoTech-SupplyChain-5.1.0/Supplychain/Schema/simulator_files_description.py | simulator_format = {
"ModelParameters": [
"TimeStepDuration",
"TimeStepPerCycle",
"NumberOfCycle",
"StartingDate",
"ManageBacklogQuantities",
"OptimizationObjective",
"ActivateUncertainties",
"EmptyObsoleteStocks",
"UncertaintiesProbabilityDist... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/plugins/output/rss.py | import base64
import datetime
import hashlib
import os
from loguru import logger
from sqlalchemy import Column, DateTime, Integer, String, Unicode
from flexget import db_schema, plugin
from flexget.event import event
from flexget.utils.sqlalchemy_utils import table_add_column, table_columns
from flexget.utils.templat... | PypiClean |
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/users/permissions/profiles.py | from django import forms
from django.contrib.auth import get_user_model
from django.core.exceptions import PermissionDenied
from django.utils.translation import gettext_lazy as _
from ...acl import algebra
from ...acl.decorators import return_boolean
from ...acl.models import Role
from ...admin.forms import YesNoSwitc... | PypiClean |
/AS-Object_models-2.3.9.tar.gz/AS-Object_models-2.3.9/as_models/item_week_supply.py | from .sales_inv_utils import SalesInvBase
from datetime import datetime
import pytz
import jmespath
from threading import Lock
from . import GetInstance
from . import Supplier
from .inventory_active_items import InventoryLocation
lock = Lock()
class SupplyCollection(SalesInvBase):
ext_fields = ['finish_week','gr... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/Progress.py | from contextlib import contextmanager
from nuitka import Tracing
from nuitka.Tracing import general
from nuitka.utils.Importing import importFromInlineCopy
from nuitka.utils.ThreadedExecutor import RLock
from nuitka.utils.Utils import isWin32Windows
# spell-checker: ignore tqdm
# Late import and optional to be there... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/machinery/tmserver.py |
from django.conf import settings
from requests.exceptions import HTTPError
from .base import MachineTranslation
from .forms import URLMachineryForm
AMAGAMA_LIVE = "https://amagama-live.translatehouse.org/api/v1"
class TMServerTranslation(MachineTranslation):
"""tmserver machine translation support."""
na... | PypiClean |
/dirtrav-1.0.0.tar.gz/dirtrav-1.0.0/docs/reqcontext.rst | .. currentmodule:: flask
The Request Context
===================
The request context keeps track of the request-level data during a
request. Rather than passing the request object to each function that
runs during a request, the :data:`request` and :data:`session` proxies
are accessed instead.
This is similar to :do... | PypiClean |
/Flask-Triangle-OctoKrishna-0.5.5.tar.gz/Flask-Triangle-OctoKrishna-0.5.5/flask_triangle/widgets/standard/text.py | from __future__ import absolute_import
from __future__ import unicode_literals
from flask_triangle.widget import Widget
import flask_triangle.modifiers
class Input(Widget):
"""
HTML input element control with angular data-binding. Input control follows
HTML5 input types and polyfills the HTML5 validation... | PypiClean |
/Bin_and_Gau_distributions-0.1.tar.gz/Bin_and_Gau_distributions-0.1/Bin_and_Gau_distributions/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 |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist/models/collectiondata.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 |
/HTConsole-0.2.tar.gz/HTConsole-0.2/htconsole/command.py | import sys
import optparse
import pkg_resources
from paste import httpserver
import socket
my_package = pkg_resources.get_distribution('HTConsole')
help = """\
Starts up a local web server that you can use as a Python interactive
console of sorts.
"""
parser = optparse.OptionParser(
version=str(my_package),
... | PypiClean |
/LIMBR-0.2.8.11.tar.gz/LIMBR-0.2.8.11/README.md | LIMBR: Learning and Imputation for Mass-spec Bias Reduction
===========================================================
LIMBR provides a streamlined tool set for imputation of missing data followed by modelling and removal of batch effects. The software was designed for proteomics datasets, with an emphasis on circad... | PypiClean |
/CLAM-3.2.6.tar.gz/CLAM-3.2.6/README.rst | =======================================================
CLAM: Computational Linguistics Application Mediator
=======================================================
.. image:: https://github.com/proycon/clam/actions/workflows/clam.yml/badge.svg?branch=master
:target: https://github.com/proycon/clam/actions/
.. im... | PypiClean |
/Box2D-2.3.2.tar.gz/Box2D-2.3.2/examples/character_collision.py |
from math import cos, sin
from .framework import (Framework, main)
from Box2D import (b2CircleShape, b2EdgeShape, b2FixtureDef, b2PolygonShape,
b2_pi)
class CharacterCollision(Framework):
name = "Character Collision"
description = ("This tests various character collision shapes.\n"
... | PypiClean |
/datashape-0.5.2.tar.gz/datashape-0.5.2/docs/source/types.rst | ===============
DataShape Types
===============
In addition to :doc:`defining the grammar <grammar>`, datashape specifies
a standard set of types and some properties those types should have.
Type constructors can be classified as ``dimension`` or ``dtype``, and a
datashape is always composed of zero or more dimensions... | PypiClean |
/Fathom-Workloads-1.0rc0.tar.gz/Fathom-Workloads-1.0rc0/fathom/speech/speech.py |
import numpy as np
import tensorflow as tf
#from tensorflow.models.rnn import rnn, rnn_cell
from tensorflow.python.ops import functional_ops
from tensorflow.python.ops import variable_scope as vs
from tensorflow.contrib.rnn.python.ops.rnn_cell import _linear
from fathom.nn import NeuralNetworkModel, default_runstep
... | 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/user_read.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 |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/ui/drag_and_drop_wrapper.py |
from muntjac.event.transferable_impl import TransferableImpl
from muntjac.event.dd.drag_source import IDragSource
from muntjac.event.dd.drop_target import IDropTarget
from muntjac.event.dd.target_details_impl import TargetDetailsImpl
from muntjac.ui.html5_file import Html5File
from muntjac.ui.custom_component import C... | PypiClean |
/Couchapp-1.0.2.tar.gz/Couchapp-1.0.2/couchapp/config.py |
import re
import os
from copy import deepcopy
from .client import Database
from .errors import AppError
from . import util
class Config(object):
""" main object to read configuration from ~/.couchapp.conf or
.couchapprc/couchapp.json in the couchapp folder.
"""
DEFAULT_SERVER_URI = "http://127.0.0.... | PypiClean |
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20.20/lib/util/position.js | GENTICS = window.GENTICS || {};
GENTICS.Utils = GENTICS.Utils || {};
define(['aloha/jquery'],
function(jQuery) {
var
$ = jQuery,
GENTICS = window.GENTICS,
Class = window.Class,
console = window.console;
/**
* position utility, which will provide scroll and mouse positions
* please note that the position... | PypiClean |
/Flask-Via-2015.1.1.tar.gz/Flask-Via-2015.1.1/flask_via/routers/__init__.py | from flask_via import RoutesImporter
class BaseRouter(object):
""" Base router class all routers should inherit from providing common
router functionality.
.. versionadded:: 2014.05.06
Example
-------
.. sourcecode:: python
from flask.ext.via.routers import BaseRouter
class... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/core/anchor/utils.py | import torch
def images_to_levels(target, num_levels):
"""Convert targets by image to targets by feature level.
[target_img0, target_img1] -> [target_level0, target_level1, ...]
"""
target = torch.stack(target, 0)
level_targets = []
start = 0
for n in num_levels:
end = start + n
... | PypiClean |
/Aruna-Python-API-1.1.0rc6.tar.gz/Aruna-Python-API-1.1.0rc6/aruna/api/storage/services/v1/collection_service_pb2_grpc.py | """Client and server classes corresponding to protobuf-defined services."""
import grpc
from aruna.api.storage.services.v1 import collection_service_pb2 as aruna_dot_api_dot_storage_dot_services_dot_v1_dot_collection__service__pb2
class CollectionServiceStub(object):
"""CollectionService
Contains all method... | PypiClean |
/ABR-0.0.10.tar.gz/ABR-0.0.10/abr/datatype.py | from enum import Enum
import functools
import operator
import numpy as np
import pandas as pd
from scipy import signal
from atom.api import Atom, Bool, Int, Typed, Value
from .peakdetect import (generate_latencies_bound, generate_latencies_skewnorm,
guess, guess_iter, peak_iterator)
@funct... | PypiClean |
/LstGen-0.6.2.tar.gz/LstGen-0.6.2/lstgen/generators/java.py | import ast
from .. import prepare_expr
from .base import JavaLikeGenerator
class JavaGenerator(JavaLikeGenerator):
""" Java Generator """
def __init__(self, parser, outfile, class_name=None, indent=None, package_name='default'):
super(JavaGenerator, self).__init__(parser, outfile, class_name, indent)
... | PypiClean |
/Gbtestapi0.1-0.1a10-py3-none-any.whl/gailbot/plugins/loader/directoryloader.py | import os
import pip
from cryptography.fernet import Fernet
from typing import Dict, List, Union, TypedDict, Tuple
from dataclasses import dataclass
from .pluginLoader import PluginLoader
from ..suite import PluginSuite
from gailbot.core.utils.logger import makelogger
from gailbot.core.utils.general import (
filepa... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/calculate_savings_request.py |
from msrest.serialization import Model
class CalculateSavingsRequest(Model):
"""CalculateSavingsRequest.
:param bill_selection_option: Determines which option will be used to
select the bills for this instance of the cost avoidance processor to
process
- "AllBills" means all bills will be pro... | PypiClean |
/node_managment_application-0.0.1.tar.gz/node_managment_application-0.0.1/nms_app/static/rest_framework/js/ajax-form.js | function replaceDocument(docString) {
var doc = document.open("text/html");
doc.write(docString);
doc.close();
}
function doAjaxSubmit(e) {
var form = $(this);
var btn = $(this.clk);
var method = (
btn.data('method') ||
form.data('method') ||
form.attr('method') || 'GET'
).toUpperCase();
... | PypiClean |
/BenchML-0.3.4.tar.gz/BenchML-0.3.4/benchml/readwrite.py | import copy
import json
import os
import pickle
import types
import numpy as np
from benchml import ptable, utils
from benchml.logger import Mock, log
ase = Mock()
ase.io = None
def disable_ase():
global ase
ase = Mock()
ase.io = None
log << log.mb << "[readwrite: Using built-in parser]" << log.end... | PypiClean |
/CAMELS_library-0.3.tar.gz/CAMELS_library-0.3/library/camels_library.py | import numpy as np
import sys,os,h5py,time
import readgadget
import MAS_library as MASL
import units_library as UL
import sorting_library as SL
import Pk_library as PKL
import HI_library as HIL
import scipy.spatial as SS
# define constants here
rho_crit = UL.units().rho_crit #h^2 Msun/Mpc^3
BOLTZMANN = 1.38065e-16 ... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/timeline-item.js | module.exports =
/******/ (function (modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in ... | PypiClean |
/CindyScriptPygments-0.2.0.tar.gz/CindyScriptPygments-0.2.0/CindyScriptPygments.py |
import re
import sys
from pygments.lexer import RegexLexer, bygroups, using
from pygments.lexers import get_lexer_by_name
from pygments.token import Token
if sys.version_info[0] >= 3:
u = str
uchr = chr
else:
u = unicode
uchr = unichr
def decompressUnicodeRanges(d, s, h):
utf16 = len(u"\U00012345... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/classes/html/SaxParser.js | (function(tinymce) {
/**
* This class parses HTML code using pure JavaScript and executes various events for each item it finds. It will
* always execute the events in the right order for tag soup code like <b><p></b></p>. It will also remove elements
* and attributes that doesn't fit the schema if the validate ... | PypiClean |
/Gizela-1.0.18.tar.gz/Gizela-1.0.18/gizela/data/PointListSimple.py | from gizela.util.Error import Error
from gizela.text.TextTable import TextTable
from gizela.data.PointBase import PointBase
class PointListSimpleError(Error): pass
class PointListSimple(object):
"""List of geodetic points CoordBase without searching by id"""
__slots__ = ["_list", "_textTable"]
d... | PypiClean |
/COAsT-3.2.1.tar.gz/COAsT-3.2.1/coast/_utils/experiments_file_handling.py |
import json
from typing import List
import numpy as np
def experiments(experiments="experiments.json"):
"""
Reads a json formatted files, default name is experiments.json
for lists of:
experiment names (exp_names)
directory names (dir names)
domain file names (domains)
file names ... | PypiClean |
/NREL_reVX-0.3.53-py3-none-any.whl/reVX/handlers/database.py | import pandas as pd
import psycopg2
import getpass
import time
class Database:
"""Framework to interact with the reV/reVX database."""
def __init__(self, db_name, db_host='gds_edit.nrel.gov', db_user=None,
db_pass=None, db_port=5432):
"""
Parameters
----------
... | PypiClean |
/DataSae-0.1.37.tar.gz/DataSae-0.1.37/datasae/quality/consistency.py |
# GNU AFFERO GENERAL PUBLIC LICENSE
# Version 3, 19 November 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.
# ... | PypiClean |
/Glastopf-3.1.2.tar.gz/Glastopf-3.1.2/glastopf/modules/handlers/emulators/rfi.py |
import urllib2
import hashlib
import os
import re
import logging
import glastopf.sandbox.sandbox as sandbox
from glastopf.modules.handlers import base_emulator
logger = logging.getLogger(__name__)
class RFIEmulator(base_emulator.BaseEmulator):
def __init__(self, data_dir):
super(RFIEmulator, self).__i... | PypiClean |
/Mopidy-Sangu-1.2.0.tar.gz/Mopidy-Sangu-1.2.0/mopidy_sangu/storage/__init__.py | import logging
import sqlite3
from mopidy_sangu import Extension
from mopidy_sangu.storage.storage import (
create_connection,
create_vote_table,
clear,
get_votes,
increase_votes,
decrease_votes,
get_all_votes,
)
logger = logging.getLogger(__name__)
class VoteDatabaseProvider:
def __... | PypiClean |
/AbPyTools-0.3.2.tar.gz/AbPyTools-0.3.2/abpytools/core/fab_collection.py | from .chain_collection import ChainCollection
import numpy as np
import pandas as pd
from .chain import calculate_charge
from abpytools.utils import DataLoader
from operator import itemgetter
from .fab import Fab
from .helper_functions import germline_identity_pd, to_numbering_table
from .base import CollectionBase
imp... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/modules/torch/decoder/seq2seq_state.py | r"""
每个Decoder都有对应的State用来记录encoder的输出以及Decode的历史记录
"""
__all__ = [
'State',
"LSTMState",
"TransformerState"
]
from typing import Union, List, Tuple
import torch
class State:
"""
每个 ``Decoder`` 都有对应的 :class:`State` 对象用来承载 ``encoder`` 的输出以及当前时刻之前的 ``decode`` 状态。
:param encoder_output: 如果不为 ... | PypiClean |
/CFS_Manager-1.3.0a0.tar.gz/CFS_Manager-1.3.0a0/docs/README.rst | *******
Read Me
*******
CFS_Manager aims to make cloud storage easy to manage, even when you're dealing with multiple providers. It creates a unified API for upload/download/modification of files on multiple platforms. The unified API is mostly internal to the script, as the main user interface is the console script (... | PypiClean |
/Jijin_data-0.5.0-py3-none-any.whl/BBData/utils.py | import numpy as np
import pandas as pd
from tqdm import tqdm
from .reader_utils import Cal
from .config import default_start_date, default_end_date, susday_config, suspension_config
from .tools import nanargsort, bisect_left, bisect_right, match_amt, dict_configure
calendar = Cal._get_calendar("Tday")
def create_ndns... | PypiClean |
/Durus-4.2.tar.gz/Durus-4.2/durus/persistent_dict.py | from copy import copy
from durus.persistent import PersistentObject
from durus.utils import iteritems
class PersistentDict (PersistentObject):
"""
Instance attributes:
data : dict
"""
__slots__ = ['data']
data_is = dict # for type checking using QP's spec module
def __init__(self, *args... | PypiClean |
/Caroline-presentation-0.2.4.tar.gz/Caroline-presentation-0.2.4/README.md | # <img src="./caroline/html/images/caroline2.png " alt="Caroline logo" width="200" height="66">
**Caroline** is open-source Python framework for interactive web/HTML+JS based
science presentations.
With Caroline you can show and annotate everything.
Interface is minimalistic and focus is on content, as we stick to the... | PypiClean |
/NlpToolkit-Classification-1.0.16.tar.gz/NlpToolkit-Classification-1.0.16/Classification/Classifier/NaiveBayes.py | from Math.DiscreteDistribution import DiscreteDistribution
from Classification.Attribute.DiscreteAttribute import DiscreteAttribute
from Classification.Classifier.Classifier import Classifier
from Classification.InstanceList.InstanceList import InstanceList
from Classification.InstanceList.Partition import Partition
f... | PypiClean |
/Eve_ml-0.0.1-py3-none-any.whl/eve/app/mnist.py | import os
from typing import Any, Dict, List, Type
from warnings import warn
import eve
import eve.cores
import torch
import torch.nn as nn
import torch.nn.functional as F
from eve.app.trainer import ClsNet, Trainer
from torch.utils.data import DataLoader, random_split
from torchvision import transforms
from torchvisi... | PypiClean |
/Attest-0.5.3.tar.gz/Attest-0.5.3/attest/reporters.py | import traceback
import sys
import os
from os import path
import inspect
from pkg_resources import iter_entry_points
try:
from abc import ABCMeta, abstractmethod
except ImportError:
ABCMeta = type
abstractmethod = lambda x: x
from . import statistics
from .hook import (ExpressionEvaluator, TestFailure, CO... | PypiClean |
/Graph_State_Machine-2.1-py3-none-any.whl/Tests/self_contained_showcase_dict_state.py | from Graph_State_Machine import *
_shorthand_graph = {
'Distribution': {
'Normal': ['stan_glm', 'glm', 'gaussian'],
'Binomial': ['stan_glm', 'glm', 'binomial'],
'Multinomial': ['stan_polr', 'polr_tolerant', 'multinom'],
'Poisson': ['stan_glm', 'glm', 'poisson'],
'Beta': ['st... | PypiClean |
/LinOtpUserIdResolver-2.9.3.tar.gz/LinOtpUserIdResolver-2.9.3/useridresolver/UserIdResolver.py |
#
# LinOTP - the open source solution for two factor authentication
# Copyright (C) 2010 - 2017 KeyIdentity GmbH
#
# This file is part of LinOTP userid resolvers.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License, ... | PypiClean |
/GeologicalToolbox-0.3.1b1.tar.gz/GeologicalToolbox-0.3.1b1/README.md | 



 -- full lipid class (including subclass)
formula (dict(str:int)) -- chemical formula in the form of a dictio... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/api/http/namespaces/auth.py | import base64
import secrets
import urllib
import time
import requests
from flask import request, session, redirect, url_for
from flask_restx import Resource
from mindsdb.api.http.namespaces.configs.auth import ns_conf
from mindsdb.utilities.config import Config
from mindsdb.utilities.log import get_log
log = get_... | PypiClean |
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/lattices/psigma.py | pairs="""
5 77
135 53
21 92
43 4
136 98
28 82
28 59
89 58
131 142
67 1
59 37
34 139
18 115
14 113
66 50
143 104
35 27
115 140
85 49
5 7
18 4
89 82
136 88
36 29
145 41
105 0
140 93
101 13
99 75
109 76
5 97
11 38
131 26
12 39
0 55
38 129
134 146
137 118
62 72
81 9
102 117
126 123
88 14
25 22
105 117
44 112
29 144
106 69
... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.