id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/EPANETTOOLS-1.0.0.tar.gz/EPANETTOOLS-1.0.0/src/epanettools/epanet2.py |
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_epanet2')).lstrip('.')
try:
return importlib.import_module(mname)
... | PypiClean |
/Lowdown-0.2.1.tar.gz/Lowdown-0.2.1/doc/installing.rst | ..
:copyright: Copyright (c) 2014 ftrack
.. _installing:
**********
Installing
**********
.. highlight:: bash
Installation is simple with `pip <http://www.pip-installer.org/>`_::
pip install lowdown
Building from source
====================
You can also build manually from the source for more control. Fi... | PypiClean |
/Js2Py-0.74.tar.gz/Js2Py-0.74/js2py/internals/prototypes/jsjson.py | from __future__ import unicode_literals
from ..conversions import *
from ..func_utils import *
from ..operations import strict_equality_op
import json
indent = ''
# python 3 support
import six
if six.PY3:
basestring = str
long = int
xrange = range
unicode = str
def parse(this, args):
text, revive... | PypiClean |
/FitsGeo-1.0.0.tar.gz/FitsGeo-1.0.0/fitsgeo/const.py | import numpy as np
import vpython
def rgb_to_vector(r: float, g: float, b: float):
"""
Make vpython.vector color from rgb values
:param r: red value 0-255
:param g: green value 0-255
:param b: blue value 0-255
:return: vpython.vector with color
"""
return vpython.vector(r/255, g/255, b/255)
# Math constant... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/model/link_token.py | import re # noqa: F401
import sys # noqa: F401
from typing import (
Optional,
Union,
List,
Dict,
)
from MergePythonSDK.shared.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
OpenApiModel,
change_keys_js_to_python,... | PypiClean |
/Minetorch-0.6.17.tar.gz/Minetorch-0.6.17/minetorch/spreadsheet.py | import functools
import logging
from concurrent.futures import ThreadPoolExecutor
from google.oauth2 import service_account
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from googleapiclient.http import MediaFileUpload
from .plugin import Plugin
pool = ThreadPoolExecutor(1)... | PypiClean |
/GenomicRanges-0.3.2-py3-none-any.whl/genomicranges/io/tiling.py | import math
from typing import MutableMapping, Optional, Union
import pandas as pd
# from ..GenomicRanges import GenomicRanges
from ..SeqInfo import SeqInfo
from ..utils import split_intervals
from .pdf import from_pandas
__author__ = "jkanche"
__copyright__ = "jkanche"
__license__ = "MIT"
def tile_genome(
seq... | PypiClean |
/LUBEAT-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/sklearn_extensions/ensemble.py | from ..grf import RegressionForest
from ..utilities import deprecated
@deprecated("The SubsampledHonestForest class has been deprecated by the grf.RegressionForest class; "
"an upcoming release will remove support for the this class.")
def SubsampledHonestForest(n_estimators=100,
... | PypiClean |
/Discode.py-1.1.1.tar.gz/Discode.py-1.1.1/discode/embeds.py | from typing import Union, Optional, List
from .colours import Colour, Color
class Embed:
r"""Represents a Discord embed. This part of a :class:`Message`.
Attributes
----------
title: Optional[str]
The title of the embed.
description: Optional[str] = None
The description of the em... | PypiClean |
/OASYS1-SRW-SOLEIL-1.0.1.tar.gz/OASYS1-SRW-SOLEIL-1.0.1/orangecontrib/srw/soleil/widgets/light_sources/ow_soleil_srw_radiation.py | __author__ = 'labx'
import os, sys, numpy
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QMessageBox
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from oasys.util.oasys_util import Emit... | PypiClean |
/CocoPy-1.1.0rc.zip/CocoPy-1.1.0rc/testSuite/TestSync_Scanner.py | import sys
class Token( object ):
def __init__( self ):
self.kind = 0 # token kind
self.pos = 0 # token position in the source text (starting at 0)
self.col = 0 # token column (starting at 0)
self.line = 0 # token line (starting at 1)
self.val = u'' # tok... | PypiClean |
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/layers/mlp.py |
import oneflow as flow
from oneflow import nn
from libai.layers import Linear, build_activation
class MLP(nn.Module):
"""MLP
MLP will take the input with h hidden state, project it to intermediate
hidden dimension, perform gelu transformation, and project the
state back into h hidden dimension.
... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/utils/log.py |
from booki.utils.json_wrapper import simplejson
from booki.editor import models
# logBookHistory
def logBookHistory(book = None, version = None, chapter = None, chapter_history = None, args = {}, user=None, kind = 'unknown'):
"""
Creates history record for book change.
@type book: C{booki.editor.model... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/model/journal_entry.py | import re # noqa: F401
import sys # noqa: F401
from typing import (
Optional,
Union,
List,
Dict,
)
from MergePythonSDK.shared.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
OpenApiModel,
change_keys_js_to_python,... | PypiClean |
/0x_contract_wrappers-2.0.0-py3-none-any.whl/zero_ex/contract_wrappers/i_validator/__init__.py |
# pylint: disable=too-many-arguments
import json
from typing import ( # pylint: disable=unused-import
Any,
List,
Optional,
Tuple,
Union,
)
from eth_utils import to_checksum_address
from mypy_extensions import TypedDict # pylint: disable=unused-import
from hexbytes import HexBytes
from web3 impo... | PypiClean |
/Keras_Preprocessing-1.1.2.tar.gz/Keras_Preprocessing-1.1.2/keras_preprocessing/image/image_data_generator.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import warnings
from six.moves import range
import numpy as np
try:
import scipy
# scipy.linalg cannot be accessed until explicitly imported
from scipy import linalg
# scipy.ndimage cannot be ... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/builders/singlehtml.py | from os import path
from typing import Any, Dict, List, Tuple, Union
from docutils import nodes
from docutils.nodes import Node
from sphinx.application import Sphinx
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias
from sphinx.environment... | PypiClean |
/M5-0.3.2.tar.gz/M5-0.3.2/docs/tutorial/sim_console.md | M5 Simulator
============
The simulator is a helper application that makes it easy to see you app as it will appear on a real mobile device,
and to test and modify your app very easily.
When you run the simulator, you are actually just running your app, but the m5.simulator.js script re-frames your
app's main div insi... | PypiClean |
/MJOLNIRGui-0.9.10.tar.gz/MJOLNIRGui-0.9.10/src/main/python/Views/Cut1DManager.py | import sys
sys.path.append('..')
try:
from MJOLNIRGui.src.main.python._tools import ProgressBarDecoratorArguments,loadUI
import MJOLNIRGui.src.main.python._tools as _GUItools
from MJOLNIRGui.src.main.python.DataModels import Cut1DModel
from MJOLNIRGui.src.main.python.MJOLNIR_Data import Gui1DCutObject
... | PypiClean |
/Auxjad-1.0.0.tar.gz/Auxjad-1.0.0/auxjad/core/Shuffler.py | import random
from typing import Any, Optional, Union
import abjad
from .. import get, mutate
class Shuffler:
r"""Takes an |abjad.Container| (or child class) and shuffles or rotates its
logical ties or pitches. When shuffling or rotating pitches only, tuplets
are supported, otherwise tuplets are not sup... | PypiClean |
/IteratorDecorator-0.11.tar.gz/IteratorDecorator-0.11/README.rst | .. image:: https://travis-ci.org/stovorov/IteratorDecorator.svg?branch=master
:target: https://travis-ci.org/stovorov/IteratorDecorator
.. image:: https://codecov.io/gh/stovorov/IteratorDecorator/branch/master/graph/badge.svg
:target: https://codecov.io/gh/stovorov/IteratorDecorator
IteratorDecorator
==========... | PypiClean |
/KegBouncer-2.2.4.tar.gz/KegBouncer-2.2.4/changelog.rst | Changelog
=========
2.2.4 released 2019-03-25
#########################
* MAINT: Fix call to deprecated passlib function (fa8440f_)
.. _fa8440f: https://github.com/level12/keg-bouncer/commit/fa8440f
2.2.3 - 2017-04-04
##################
* Integrate helpful fields on user model (f48c745_)
.. _f48c745: https://git... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/reward_model/gail_irl_model.py | from typing import List, Dict, Any
import pickle
import random
from collections.abc import Iterable
from easydict import EasyDict
import torch
import torch.nn as nn
import torch.optim as optim
from ding.utils import REWARD_MODEL_REGISTRY
from .base_reward_model import BaseRewardModel
import torch.nn.functional as F
f... | PypiClean |
/GalSim-2.4.11-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl/galsim/config/output.py |
import os
import logging
from .util import LoggerWrapper, UpdateNProc, CopyConfig, MultiProcess, SetupConfigRNG
from .util import RetryIO, SetDefaultExt
from .input import ProcessInput
from .extra import valid_extra_outputs, SetupExtraOutput, WriteExtraOutputs
from .extra import AddExtraOutputHDUs, CheckNoExtraOutput... | PypiClean |
/Mopidy-InternetArchive-3.0.1.tar.gz/Mopidy-InternetArchive-3.0.1/mopidy_internetarchive/library.py | import collections
import logging
from mopidy import backend, models
from . import Extension, translator
logger = logging.getLogger(__name__)
class InternetArchiveLibraryProvider(backend.LibraryProvider):
root_directory = models.Ref.directory(
uri=translator.uri(""), name="Internet Archive"
)
... | PypiClean |
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/common/session_factory/horizontal/experiment.py |
__author__ = "Christian Heider Nielsen"
__doc__ = r"""
Created on 19/01/2020
"""
import base64
import os
import pickle
import time
from pathlib import Path
from cloudpickle import cloudpickle
from neodroid.environments.droid_environment import UnityEnvironment
from neodroidagent.agents import... | PypiClean |
/GALFITools-1.0.0.tar.gz/GALFITools-1.0.0/src/galfitools/sky/Sky.py |
import numpy as np
import sys
import os
import stat
import subprocess as sp
import os.path
from astropy.io import fits
import scipy
import scipy.special
import matplotlib.pyplot as plt
import argparse
#introducir sky box y sky ring
#use maskds9 para obtener los pixeles de las regiones
def sky(imgname, maskimage, f... | PypiClean |
/BicycleDataProcessor-0.1.0.tar.gz/BicycleDataProcessor-0.1.0/bicycledataprocessor/main.py |
# built in imports
import os
import datetime
from math import pi
# dependencies
import numpy as np
from scipy import io
from scipy.integrate import cumtrapz
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from tables import NoSuchNodeError
import dtk.process as process
from dtk.bicycle import fro... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wps/util.py |
from contextlib import closing
from logging import getLogger
try:
# available in Python 2.7+
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict
from django.conf import settings
from django.utils.module_loading import import_string
fr... | PypiClean |
/BotEXBotBase-3.1.3.tar.gz/BotEXBotBase-3.1.3/discord/invite.py | from .utils import parse_time
from .mixins import Hashable
from .object import Object
class Invite(Hashable):
"""Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite.
Depending on the way this object was created, some of the attributes can
have a value of ``None``.
.. container:: ... | PypiClean |
/NovalIDE-1.1.8-py3-none-any.whl/noval/python/interpreter/pythonpath.py | from noval import _
import tkinter as tk
from tkinter import ttk,messagebox
import noval.python.parser.utils as parserutils
import noval.python.interpreter.pythonpathmixin as pythonpathmixin
import noval.util.utils as utils
class PythonPathPanel(ttk.Frame,pythonpathmixin.PythonpathMixin):
def __init__(self,parent)... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/nova/uart.py | """UART Class for Binho Nova"""
from adafruit_blinka.microcontroller.nova import Connection
class UART:
"""Custom UART Class for Binho Nova"""
ESCAPE_SEQUENCE = "+++UART0"
# pylint: disable=too-many-arguments,unused-argument
def __init__(
self,
portid,
baudrate=9600,
... | PypiClean |
/DoorPi-2.4.1.8.tar.gz/DoorPi-2.4.1.8/doorpi/sipphone/from_linphone.py |
import logging
logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
import datetime
from AbstractBaseClass import SipphoneAbstractBaseClass, SIPPHONE_SECTION
import linphone as lin
from doorpi import DoorPi
from doorpi.sipphone.linphone_lib.CallBacks import LinphoneCallbacks
from doorpi.sipphone... | PypiClean |
/Helmholtz-0.2.0.tar.gz/Helmholtz-0.2.0/helmholtz/editor/management/commands/equipment_constraints.py | from copy import deepcopy
material_constraints = [
{
'displayed_in_navigator':True,
'shunt':True,
'form':'helmholtz.editor.forms.equipment.MaterialForm',
}
]
material = {
'content_type':{
'app_label':'equipment',
'model':'material'
},
'position':1,
'constraints':ma... | PypiClean |
/AHP-0.0.1.tar.gz/AHP-0.0.1/README.md | # AHP
层次分析法
## How to use
Install
`pip install ahp`
use
```python
from AHP import AHP
import numpy as np
# 准则重要性矩阵
criteria = np.array([[1, 2, 7, 5, 5],
[1 / 2, 1, 4, 3, 3],
[1 / 7, 1 / 4, 1, 1 / 2, 1 / 3],
[1 / 5, 1 / 3, 2, 1, 1],
... | PypiClean |
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/connection/transport/tcp/tcp_abridged_o.py |
import logging
import os
from typing import Optional
import pyrogram
from pyrogram.crypto import aes
from .tcp import TCP
log = logging.getLogger(__name__)
class TCPAbridgedO(TCP):
RESERVED = (b"HEAD", b"POST", b"GET ", b"OPTI", b"\xee" * 4)
def __init__(self, ipv6: bool, proxy: dict):
super().__i... | PypiClean |
/MemeLib-0.1.5-py3-none-any.whl/memelib/api.py | import aiohttp
import random
import requests
from memelib.errors import *
from memelib._utils import _format
class DankMemeClient:
"""The client to get memes from"""
def __init__(
self,
use_reddit_for_memes: bool = True,
reddit_user_agent: str = "MemeLib",
return_embed: bool ... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/utilities/fs.py | import os
import tempfile
import threading
import time
from pathlib import Path
from typing import Optional
import psutil
from appdirs import user_data_dir
def create_directory(path):
path = Path(path)
path.mkdir(mode=0o777, exist_ok=True, parents=True)
def get_root_path():
mindsdb_path = user_data_dir... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/45231.ddc8880b90bac9f028f5.min.js | "use strict";(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[45231],{71050:function(n,e,t){var o=t(87537),s=t.n(o),r=t(23645),l=t.n(r)()(s());l.push([n.id,".hljs{display:block;overflow-x:auto;padding:.5em;background:#1c1b19;color:#fce8c3}.hljs-strong,.hljs-emphasis{color... | PypiClean |
/CrudeBHT-1.0.7-py3-none-any.whl/code/body.py | from math import sqrt
G = 6.673e-11 # gravitational constant
class Body:
# cartesian positions
rx: float
ry: float
# velocity components
vx: float
vy: float
# force components
fx: float = 0.0
fy: float = 0.0
mass: float
def __init__(self, rx: float, ry: float,
... | PypiClean |
/AMONG_py-0.0.3.4-py3-none-any.whl/AMONGpy/analysis.py | import csv, json, itertools
def get_recommended_project(exam_logs_json) :
'''
Student json
{
"name" : "이름",
"id" : "아이디",
"test" : [
{"answer" : [5, 4]},
{"answer" : [2, 4]}
]
}
Test json
[
{"name" : "시험 이름",
"number" : 10,
"problems" : [
{
"tags" : ... | PypiClean |
/Box2D-2.3.2.tar.gz/Box2D-2.3.2/examples/vertical_stack.py |
from .framework import (Framework, Keys, main)
from Box2D import (b2CircleShape, b2EdgeShape, b2FixtureDef, b2PolygonShape)
class VerticalStack (Framework):
name = "Vertical Stack"
description = ("Tests the stability of stacking circles and boxes\n"
"Press B to launch a horizontal bullet")... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/form/Uploader.js | require({cache:{"url:dojox/form/resources/Uploader.html":"<span class=\"dijit dijitReset dijitInline\"\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\tdojoAttachEvent=\"ondijitclick:_onClick\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdojoAttachPoint=\"titleNode,focusNode\... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/db/migrations/state.py | import copy
from collections import OrderedDict
from contextlib import contextmanager
from djmodels.apps import AppConfig
from djmodels.apps.registry import Apps, apps as global_apps
from djmodels.conf import settings
from djmodels.db import models
from djmodels.db.models.fields.proxy import OrderWrt
from djmodels.db.... | PypiClean |
/BlueWhale3_SingleCell-1.3.5-py3-none-any.whl/orangecontrib/single_cell/widgets/owfilter.py | import sys
import enum
import math
import numbers
from contextlib import contextmanager
from types import SimpleNamespace
import typing
from typing import Optional, Sequence, Tuple, Dict, Callable, Union, Iterable
import numpy as np
from scipy import stats
from AnyQt.QtCore import Qt, QSize, QPointF, QRectF, QLineF... | PypiClean |
/EuroPython2006_PyQt4_Examples-1.0.zip/EuroPython2006_PyQt4_Examples-1.0/Custom Widgets/Qt Examples/charactermap.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 |
/NehorayRapid1-0.0.1-py3-none-any.whl/RapidBase/Utils/MISCELENEOUS.py | from RapidBase.Basic_Import_Libs import *
import numpy as np
import collections
import os
def save_obj(obj, name):
with open(name + '.pkl', 'wb') as f:
pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
def load_obj(name):
with open(name + '.pkl', 'rb') as f:
return pickle.load(f)
def save_dict(obj... | PypiClean |
/NeuralPlayground-0.0.7.tar.gz/NeuralPlayground-0.0.7/neuralplayground/agents/whittington_2020_extras/whittington_2020_analyse.py | import numpy as np
import torch
def performance(forward, model, environments):
"""
Track prediction accuracy over walk, and calculate fraction of locations visited and actions taken to assess performance.
Parameters
----------
forward : list
List of forward passes through the model... | PypiClean |
/Glint-0.2.0.zip/Glint-0.2.0/README.md | # Glint
[](https://travis-ci.org/mlowen/Glint)
Glint is a micro framework for command line applications, it creates the needed parameters that should be passed to the application based on the function signatures that it is supplied.
### Inspiration
... | PypiClean |
/Js2Py-0.74.tar.gz/Js2Py-0.74/js2py/constructors/jsfloat32array.py |
from ..base import *
try:
import numpy
except:
pass
@Js
def Float32Array():
TypedArray = (PyJsInt8Array, PyJsUint8Array, PyJsUint8ClampedArray,
PyJsInt16Array, PyJsUint16Array, PyJsInt32Array,
PyJsUint32Array, PyJsFloat32Array, PyJsFloat64Array)
a = arguments[0]
... | PypiClean |
/AllanTools-2019.9.tar.gz/AllanTools-2019.9/allantools/dataset.py | from . import allantools
class Dataset(object):
""" Dataset class for Allantools
:Example:
::
import numpy as np
# Load random data
a = allantools.Dataset(data=np.random.rand(1000))
# compute mdev
a.compute("mdev")
print(a.out["... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/docs/source/tutorial/part2.rst | ##################
Simple Ensembles
##################
You might be wondering how to create your own BigJob script or how BigJob can be useful for your needs. Before delving into the remote job and data submission capabilities that BigJob has, its important to understand the basics.
========================
Hands-On... | PypiClean |
/emily_editor-0.9-py3-none-any.whl/src/emily0_9/html_texting.py | from . import texting
from guibits1_0 import type_checking2_0
# author R.N.Bosworth
# version 2 Mar 2023 15:15
"""
Contractor which allows the client to advance and retreat through HTML text,
as it appears on the screen,
ignoring tags and dealing with escaped code points.
An "HTML character" is either an escaped... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/itypes/rtypes.py | import platform
import copy
import numpy
import operator
from collections import defaultdict
from ..constants import *
from ..utils import util
from ..parser_objs import *
_delay_import_(globals(),"dimensions")
_delay_import_(globals(),"dimpaths")
_delay_import_(globals(),"casts")
_delay_import_(globals(),"type_attrib... | PypiClean |
/AsyncDex-1.1.tar.gz/AsyncDex-1.1/asyncdex/ratelimit.py | import asyncio
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from logging import getLogger
from math import ceil
from re import Pattern
from typing import Dict, Optional, Tuple
import aiohttp
logger = getLogger(__name__)
@dataclass(frozen=True)
class Path:
"""A Path object re... | PypiClean |
/lektor-3.4.0b6-py3-none-any.whl/lektor/filecontents.py | import base64
import codecs
import hashlib
import mimetypes
import os
from lektor.utils import deprecated
class FileContents:
@deprecated(name="FileContents", version="3.4.0")
def __init__(self, filename):
self.filename = filename
self._md5 = None
self._sha1 = None
self._integ... | PypiClean |
/CC-dbgen-0.2.0.tar.gz/CC-dbgen-0.2.0/dbgen/scripts/IO/get_catalog_sherlock.py | from typing import List,Tuple
from os import listdir
from glob import glob
################################################################################
def get_catalog_sherlock(rootpath : str
,existing : str
) -> Tuple[List[str],List[str],List[str]
... | PypiClean |
/Braindecode-0.7.tar.gz/Braindecode-0.7/braindecode/models/usleep.py |
import numpy as np
import torch
from torch import nn
def _crop_tensors_to_match(x1, x2, axis=-1):
"""Crops two tensors to their lowest-common-dimension along an axis."""
dim_cropped = min(x1.shape[axis], x2.shape[axis])
x1_cropped = torch.index_select(
x1, dim=axis,
index=torch.arange(di... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/search/non-minified-js/german-stemmer.js | var JSX = {};
(function (JSX) {
/**
* extends the class
*/
function $__jsx_extend(derivations, base) {
var ctor = function () {};
ctor.prototype = base.prototype;
var proto = new ctor();
for (var i in derivations) {
derivations[i].prototype = proto;
}
}
/**
* copies the implementations from source interface ... | PypiClean |
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/run/metric/summary.py | import sys
import weakref
from collections import deque
from typing import Any, Deque, Optional, Sequence
import numpy as np
from torch.optim.optimizer import Optimizer
from BIT_DL.pytorch.run.metric.base_metric import StreamingMetric
__all__ = [
"Average",
"AveragePerplexity",
"RunningAverage",
"LR"... | PypiClean |
/CrossMap-0.6.6-py3-none-any.whl/cmmodule/wig_reader.py | import sys
import bx.wiggle
from bx.bbi.bigwig_file import BigWigFile
import numpy
import collections
from itertools import groupby
from operator import itemgetter
from cmmodule import BED
def wig_to_bgr2(pos2val):
'''pos2val is dictionary: position: value. position is 0 based '''
v2p = collections.defaultdic... | PypiClean |
/GALFITools-1.0.0.tar.gz/GALFITools-1.0.0/CHANGELOG.rst | =========
Changelog
=========
Version 0.1
===========
- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
Version 0.15.2
===============
GALFITools serves as a comprehensive
library designed to enhance the functionality
of GALFIT, a powerful tool for galaxy
modeling. With GALFITools, you c... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/pages/course_admin/task_edit.py |
""" Pages that allow editing of tasks """
import json
import logging
import tempfile
import bson
import flask
from collections import OrderedDict
from zipfile import ZipFile
from flask import redirect
from werkzeug.exceptions import NotFound
from inginious.frontend.tasks import _migrate_from_v_0_6
from inginious.fro... | PypiClean |
/Flask_OAuthlib-0.9.6-py3-none-any.whl/flask_oauthlib/contrib/cache.py |
from cachelib import NullCache, SimpleCache, FileSystemCache
from cachelib import MemcachedCache, RedisCache
class Cache(object):
def __init__(self, app, config_prefix='OAUTHLIB', **kwargs):
self.config_prefix = config_prefix
self.config = app.config
cache_type = '_%s' % self._config('ty... | PypiClean |
/BittyTax-0.5.1.tar.gz/BittyTax-0.5.1/src/bittytax/conv/parsers/circle.py |
from ...config import config
from ..dataparser import DataParser
from ..exceptions import UnexpectedTypeError
from ..out_record import TransactionOutRecord
WALLET = "Circle"
def parse_circle(data_row, parser, **_kwargs):
row_dict = data_row.row_dict
data_row.timestamp = DataParser.parse_timestamp(row_dict["... | PypiClean |
/MkNxGn_Essentials-0.1.40.tar.gz/MkNxGn_Essentials-0.1.40/essentials/socket_ops/__init__.py | import struct, socket, threading, json, os, pickle
from essentials import tokening
import essentials
import copy
import time
from hashlib import sha1
import base64
import array
print("THIS MODULE IS DEPRECATED. PLEASE USE SOCKET_OPS_V2")
PYTHONIC = "python based"
WEB_BASED = "web based"
def SocketDownload(sock, data... | PypiClean |
/OctoBot-Tentacles-Manager-2.9.4.tar.gz/OctoBot-Tentacles-Manager-2.9.4/octobot_tentacles_manager/uploaders/nexus_uploader.py | import os
import aiohttp
import octobot_tentacles_manager.uploaders.uploader as uploader
class NexusUploader(uploader.Uploader):
ENV_NEXUS_USERNAME = "NEXUS_USERNAME"
ENV_NEXUS_PASSWORD = "NEXUS_PASSWORD"
ENV_NEXUS_URL = "NEXUS_URL"
NEXUS_EXPECTED_RESPONSE_STATUS = [200, 201]
def __init__(self):... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-table/src/locale/bootstrap-table-da-DK.js | $.fn.bootstrapTable.locales['da-DK'] = $.fn.bootstrapTable.locales['da'] = {
formatCopyRows () {
return 'Copy Rows'
},
formatPrint () {
return 'Print'
},
formatLoadingMessage () {
return 'Indlæser, vent venligst'
},
formatRecordsPerPage (pageNumber) {
return `${pageNumber} poster pr side`
... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/atomic/atomic.py | from mathics.builtin.base import Builtin, Test
from mathics.core.atoms import Atom
class AtomQ(Test):
"""
<url>:WMA link:https://reference.wolfram.com/language/ref/AtomQ.html</url>
<dl>
<dt>'AtomQ[$expr$]'
<dd>returns 'True' if $expr$ is an expression which cannot be divided into \
sube... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dijit/place.js.uncompressed.js | define("dijit/place", [
"dojo/_base/array", // array.forEach array.map array.some
"dojo/dom-geometry", // domGeometry.getMarginBox domGeometry.position
"dojo/dom-style", // domStyle.getComputedStyle
"dojo/_base/kernel", // kernel.deprecated
"dojo/_base/window", // win.body
"dojo/window", // winUtils.getBox
"." /... | PypiClean |
/IOT-Analytics-0.0.2.tar.gz/IOT-Analytics-0.0.2/readme.md | # IOT Analytics
**Analytics for your robot or IOT device**
[](https://pypi.python.org/pypi/iot-analytics/)
[](https://travis-ci.org/gunthercox/iot-analytics)
[![Coverage ... | PypiClean |
/Barak-0.3.2.tar.gz/Barak-0.3.2/barak/sed.py | from __future__ import division
from io import readtabfits
from constants import c, c_kms, Jy
from utilities import get_data_path
import numpy as np
from numpy.random import randn
import matplotlib.pyplot as pl
import os, math
import warnings
DATAPATH = get_data_path()
PATH_PASSBAND = DATAPATH + '/passbands/'
PATH_... | PypiClean |
/Flask-Pay-WX-1.0.5.tar.gz/Flask-Pay-WX-1.0.5/flask_pay_wx/v2/__init__.py | from typing import Dict
from flask_pay_wx.v2.Tools import Tools
class PayOrder(object):
def __init__(self, private_key: str, app_id: str = None, mch_id: str = None, nonce_str: str = None, product_body: str = None,
out_trade_no: str = None, total_fee: str = None, spbill_create_ip: str = None, no... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py | _base_ = [
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
model = dict(
type='NASFCOS',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_c... | PypiClean |
/BuildStream-2.0.1-cp39-cp39-manylinux_2_28_x86_64.whl/buildstream/downloadablefilesource.py | import os
import urllib.request
import urllib.error
import contextlib
import shutil
import netrc
from .source import Source, SourceError
from . import utils
class _NetrcFTPOpener(urllib.request.FTPHandler):
def __init__(self, netrc_config):
self.netrc = netrc_config
def _unsplit(self, host, port, us... | PypiClean |
/BGT_Client-1.0.2-py3-none-any.whl/dgt_sdk/protobuf/network_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_in... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_seh.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 |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/gis/gdal/prototypes/generation.py | from ctypes import POINTER, c_bool, c_char_p, c_double, c_int, c_int64, c_void_p
from functools import partial
from django.contrib.gis.gdal.prototypes.errcheck import (
check_arg_errcode,
check_const_string,
check_errcode,
check_geom,
check_geom_offset,
check_pointer,
check_srs,
check_s... | PypiClean |
/ChemGAPP-0.0.9-py3-none-any.whl/ChemGAPP_Package/ChemGAPP_Big/MW_Conditions_to_Remove.py |
# In[ ]:
import argparse
import pandas as pd
def get_options():
parser = argparse.ArgumentParser(description="Outputs a list of conditions which were removed at a certain chosen threshold for the Mann Whitney Condition Level test. Also outputs a new dataset to go back into the process of normalisation and scoring... | PypiClean |
/Oasis_Optimization-1.0.2-py3-none-any.whl/Oasis/gradient.py | import copy
import numpy
class Gradient(object):
"""
Abstract Class for Optimizer Gradient Calculation Object
"""
def __init__(self, opt_problem, sens_type, sens_mode='', sens_step={}, *args, **kwargs):
"""
Optimizer Gradient Calculation Class Initialization
Arguments:
... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/datatables-buttons/js/buttons.html5.js | (function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $, jszip,... | PypiClean |
/Bytestag-0.2b1.tar.gz/Bytestag-0.2b1/src/py3/bytestag/client.py | # This file is part of Bytestag.
# Copyright © 2012 Christopher Foo <chris.foo@gmail.com>.
# Licensed under GNU GPLv3. See COPYING.txt for details.
from bytestag import basedir
from bytestag.dht.downloading import Downloader
from bytestag.dht.network import DHTNetwork
from bytestag.dht.publishing import Publisher, Repl... | PypiClean |
/Dot_Plot-0.1.3.1.tar.gz/Dot_Plot-0.1.3.1/README.rst | =========
Dot Plot
=========
-------------------
The python script
-------------------
:Author: Nicola Cappellini
:Version: $Revision: beta $
:Copyright: This document has been placed in the public domain.
Tutorial
=========
Chord and / or scale entry
---------------------------
Via click
~~~~~~~~~~
Left-click on... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/aerodynamics/aero_2D/airfoil_polar_functions.py | from aerosandbox.geometry import Airfoil
from aerosandbox.performance import OperatingPoint
import aerosandbox.numpy as np
import aerosandbox.library.aerodynamics as aerolib
def airfoil_coefficients_post_stall(
airfoil: Airfoil,
alpha: float,
):
"""
Estimates post-stall aerodynamics of an airf... | PypiClean |
/GailBot_Testing_Suite-0.1a8-py3-none-any.whl/gailbot/core/engines/whisperEngine/whisperTimestamped/transcribe_naive.py |
import sys
import os
import numpy as np
import whisper
import torch
import torch.nn.functional as F
from .alignment import perform_word_alignment
from .utils import (
norm_language,
should_use_space,
print_timestamped,
round_confidence,
audio_minimum_padding
)
from .vars import (
AUDIO_SAMPLE... | PypiClean |
/MSOIsHH2os-1.0.tar.gz/MSOIsHH2os-1.0/flood_tool/tool.py |
import os
import numpy as np
import pandas as pd
from .geo import *
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, OneHotEncoder, LabelEncoder
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.tree import DecisionTreeC... | PypiClean |
/Gbtestapi-0.1a10-py3-none-any.whl/gailbot/core/engines/whisperEngine/core.py |
import os
from threading import Lock
import json
from typing import List, Dict, Any
from dataclasses import asdict
import torch
import whisper_timestamped as whisper
from whisper_timestamped.transcribe import force_cudnn_initialization
from .parsers import (
parse_into_full_text,
parse_into_word_dicts,
... | PypiClean |
/BGWpy-3.2.2.tar.gz/BGWpy-3.2.2/Documentation/Tutorial/Tutorial_Abinit.ipynb | # Running BerkeleyGW with BGWpy #
In this notebook, we assume that you are somewhat familiar with the BerkeleyGW software: what problem it solves, and what is the general workflow to run it. We also assume that you have a basic knowledge of Python and its terminology.
Before you begin, make sure that you have the f... | PypiClean |
/ChIP_R-1.2.0-py3-none-any.whl/chipr/ival.py | import random
class IntervalTree:
"""
Binary search tree for storing long integer intervals, and for performing queries on them.
See https://en.wikipedia.org/wiki/Interval_tree, specifically the Augmented kind.
The present implementation balances the tree by using randomisation.
"""
root = Non... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/gqcms/ConstrainedMethod.py | import numpy as np
import pandas as pd
from scipy import linalg
from typing import List
from gqcms import Hubbard
from gqcms import FCI
from gqcms import HartreeFock
from gqcms import Determinant
from gqcms import createHamiltonianSCI
from gqcms import NumberOperator
from gqcms import DensityOperator
from gqcms import... | PypiClean |
/Authomatic-1.2.1.tar.gz/Authomatic-1.2.1/authomatic/six.py | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including with... | PypiClean |
/NorBi_distribution-1.10.tar.gz/NorBi_distribution-1.10/NorBi_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 |
/BespON-0.6.0.tar.gz/BespON-0.6.0/bespon/encoding.py |
# pylint: disable = C0301
from __future__ import (division, print_function, absolute_import,
unicode_literals)
import sys
import re
import collections
import fractions
from . import escape
from . import grammar
from . import tooling
if sys.version_info.major == 2:
str = unicode
cl... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/av/FLAudio.js.uncompressed.js | define("dojox/av/FLAudio", ['dojo', 'dojox/embed/Flash', 'dojox/timing/doLater'],function(dojo, dijit){
dojo.experimental("dojox.av.FLVideo");
dojo.declare("dojox.av.FLAudio", null, {
// summary:
// Play MP3 files through the Flash SWF built in the
// DEFT project.
// description:
// This class is brand new,... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/fitbenchmarking/parsing/nist_data_functions.py | import numpy as np
from fitbenchmarking.utils.exceptions import ParsingError
def nist_func_definition(function, param_names):
"""
Processing a function plus different set of starting values as specified in
the NIST problem definition file into a callable
:param function: function string as defined i... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/plugins/digitalbitbox/digitalbitbox.py |
try:
import electrum_vtc as electrum
from electrum_vtc.bitcoin import TYPE_ADDRESS, var_int, msg_magic, Hash, verify_message, pubkey_from_signature, point_to_ser, public_key_to_p2pkh, EncodeAES, DecodeAES, MyVerifyingKey
from electrum_vtc.i18n import _
from electrum_vtc.keystore import Hardware_KeyStor... | PypiClean |
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/java/cfg.py | from collections import defaultdict as ddict
from .. import graph_util
from ..ssa import objtypes
from . import ast
def flattenDict(replace):
for k in list(replace):
while replace[k] in replace:
replace[k] = replace[replace[k]]
# The basic block in our temporary CFG
# instead of code, it mer... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/html5lib/_tokenizer.py | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import unichr as chr
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, hexDigits, EOF
from .c... | PypiClean |
/McPhysics-1.5.12.tar.gz/McPhysics-1.5.12/__init__.py | import sys as _sys
import os as _os
import traceback as _traceback
_p = _traceback.print_last
try: import spinmob
except: raise Exception('You definitely need to install spinmob to do anything in mcphysics.')
# Add the appropriate paths for different operating systems
# Location of the linux libm2k dll
if not _s... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/inherits/README.md | Browser-friendly inheritance fully compatible with standard node.js
[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
This package exports standard `inherits` from node.js `util` module in
node environment, but also provides alternative browser-friendly
implementation through... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.