id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/CommonEnvironment-Formatter-0.5.0b1.tar.gz/CommonEnvironment-Formatter-0.5.0b1/CommonEnvironment_Formatter/Plugins/PythonFormatterImpl/SplitterPlugin.py | """Contains the Plugin object"""
import os
from collections import OrderedDict
from enum import Enum, auto
import black
from blib2to3.pygram import python_symbols, token as python_tokens
import six
import CommonEnvironment
from CommonEnvironment import Interface
from PluginBase import PluginBase
# ---------------... | PypiClean |
/HerePyHive-0.6.2.tar.gz/HerePyHive-0.6.2/TCLIService/TCLIService.py |
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
import sys
import logging
from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
class Iface(object):
def OpenSession(... | PypiClean |
/cim-14.12a1.tar.gz/cim-14.12a1/CDPSM/IEC61970/Wires.py | #------------------------------------------------------------------------------
# Imports:
#------------------------------------------------------------------------------
from CDPSM.IEC61970.Core import ConductingEquipment
from CDPSM.IEC61970.Core import PowerSystemResource
from CDPSM.IEC61970.Core import EquipmentCo... | PypiClean |
/GodoPy-0.0.3-cp38-cp38-win_amd64.whl/godot_tools/binding_generator/pxd_writer.py | import sys
import subprocess
from pycparser import c_parser
from autopxd.nodes import Array
from autopxd.writer import AutoPxd
from autopxd.declarations import BUILTIN_HEADERS_DIR, IGNORE_DECLARATIONS
# Copied from autopxd2, modified preprocessor for macOS
def preprocess(code, extra_cpp_args=[]):
preprocessor =... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/doc/html/epydoc.js | function toggle_private() {
// Search for any private/public links on this page. Store
// their old text in "cmd," so we will know what action to
// take; and change their text to the opposite action.
var cmd = "?";
var elts = document.getElementsByTagName("a");
for(var ... | PypiClean |
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/utils.py |
import asyncio
import base64
import functools
import hashlib
import os
import struct
from concurrent.futures.thread import ThreadPoolExecutor
from datetime import datetime, timezone
from getpass import getpass
from typing import Union, List, Dict, Optional
import pyrogram
from pyrogram import raw, enums
from pyrogram... | PypiClean |
/DeepEnsemble-0.0.3.tar.gz/DeepEnsemble-0.0.3/README.md | <h1 align="center">DEEP ENSEMBLE</h1>
## Description
<p>In the context of deep learning, This library is a wrapper, It allows one to perform ensembling techniques such as Stacked Ensembling, Weighted Ensembling, Ensembling based on Votes.
This library get in an array of predictions made by different models on which t... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/mpmath/libmp/gammazeta.py | import math
from .backend import xrange
from .backend import MPZ, MPZ_ZERO, MPZ_ONE, MPZ_THREE, gmpy
from .libintmath import list_primes, ifac, ifac2, moebius
from .libmpf import (\
round_floor, round_ceiling, round_down, round_up,
round_nearest, round_fast,
lshift, sqrt_fixed, isqrt_fast,
fzero, fon... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/life_cycle_savings.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def life_cycle_savings(path):
"""Intercountry Life-Cycle Savings Data
Data on the savings rati... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/matchers/_test/separators.py | #from logging import basicConfig, DEBUG
from unittest import TestCase
from lepl import And, Optional, Space, Separator, SmartSeparator1, \
SmartSeparator2, Eos
#basicConfig(level=DEBUG)
PRINT = False
STREAMS_3 = ['a b c ',
'a b c',
' b c',
'b c',
'ab c',
'... | PypiClean |
/Aruna-Python-API-1.1.0rc6.tar.gz/Aruna-Python-API-1.1.0rc6/aruna/api/storage/services/v1/service_account_service_pb2_grpc.py | """Client and server classes corresponding to protobuf-defined services."""
import grpc
from aruna.api.storage.services.v1 import service_account_service_pb2 as aruna_dot_api_dot_storage_dot_services_dot_v1_dot_service__account__service__pb2
class ServiceAccountServiceStub(object):
"""ServiceAccountService
... | PypiClean |
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/font-awesome/CONTRIBUTING.md | # Contributing to Font Awesome
Looking to contribute something to Font Awesome? **Here's how you can help.**
## Reporting issues
We only accept issues that are icon requests, bug reports, or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Font Awesome core. Please read ... | PypiClean |
/Eureqa-1.76.0.tar.gz/Eureqa-1.76.0/eureqa/run_analysis_template.py |
# Copyright (c) 2017, Nutonian Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and t... | PypiClean |
/Creoleparser-0.7.5.tar.gz/Creoleparser-0.7.5/creoleparser/elements.py |
import re
from six.moves.urllib.parse import urljoin, urlsplit, quote
from six import string_types
import urllib
import keyword
import warnings
import traceback
import unicodedata
import genshi.builder as bldr
from genshi.core import Stream, Markup
from .core import (escape_char, esc_neg_look, fragmentize,
... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/app-pouchdb/.github/ISSUE_TEMPLATE.md | <!-- Instructions: https://github.com/PolymerElements/app-pouchdb/CONTRIBUTING.md#filing-issues -->
### Description
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
### Expected outcome
<!-- Example: The page stays the same color. -->
### Actual outcome
<!-- Example: The page tur... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/TeX/Caligraphic/Regular/Main.js | MathJax.OutputJax.SVG.FONTDATA.FONTS.MathJax_Caligraphic={directory:"Caligraphic/Regular",family:"MathJax_Caligraphic",id:"MJCAL",skew:{65:0.194,66:0.139,67:0.139,68:0.0833,69:0.111,70:0.111,71:0.111,72:0.111,73:0.0278,74:0.167,75:0.0556,76:0.139,77:0.139,78:0.0833,79:0.111,80:0.0833,81:0.111,82:0.0833,83:0.139,84:0.02... | PypiClean |
/AeroEvap-0.0.2.post2.tar.gz/AeroEvap-0.0.2.post2/notebooks/tutorial.ipynb | # Tutorial
Basic usage with an example dataset. Note, this tutorial uses the matplotlib graphing module which is *not* a dependency of ``AeroEvap``, be sure to install it to your environment before running this tutorial if you want the plots to display correctly.
```
import pandas as pd
import numpy as np
from aeroe... | PypiClean |
/Cheetah-2.4.4.tar.gz/Cheetah-2.4.4/cheetah/Compiler.py | import sys
import os
import os.path
from os.path import getmtime, exists
import re
import types
import time
import random
import warnings
import copy
from Cheetah.Version import Version, VersionTuple
from Cheetah.SettingsManager import SettingsManager
from Cheetah.Utils.Indenter import indentize # an undocumented prep... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/nodes/ContainerMakingNodes.py | import functools
from abc import abstractmethod
from nuitka.PythonVersions import needsSetLiteralReverseInsertion
from .ConstantRefNodes import (
ExpressionConstantListEmptyRef,
ExpressionConstantSetEmptyRef,
ExpressionConstantTupleEmptyRef,
makeConstantRefNode,
)
from .ExpressionBases import Expressi... | PypiClean |
/Cheetah3-3.2.7a0-cp27-cp27m-macosx_10_13_x86_64.whl/Cheetah/Parser.py | import sys
import re
import types
import inspect
from Cheetah.SourceReader import SourceReader
from Cheetah.Unspecified import Unspecified
from Cheetah.Macros.I18n import I18n
from Cheetah.compat import PY2, string_type, unicode
if PY2:
from tokenize import pseudoprog
else:
from tokenize import _compile, Pseud... | PypiClean |
/DisplaceNet-0.1.tar.gz/DisplaceNet-0.1/applications/emotic_vgg16.py | from __future__ import division, print_function
import os
from keras.layers import Input
from keras.layers.core import Dense
from keras.models import Model
from keras.layers.core import Dropout
from keras.utils.data_utils import get_file
from keras import regularizers
from keras.applications.vgg16 import VGG16
from k... | PypiClean |
/EdaSpiffWorkflow-0.0.2.tar.gz/EdaSpiffWorkflow-0.0.2/EdaSpiffWorkflow_Aadesh_G/specs/ThreadMerge.py |
# Copyright (C) 2007 Samuel Abels
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distri... | PypiClean |
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/torchdistill-test/torchdistill/models/classification/densenet.py | from collections import OrderedDict
from typing import Any, Tuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from torchvision.models.densenet import _DenseBlock, _Transition
from torchdistill.models.registry import register_model_func
"""
Refactored https://github.com... | PypiClean |
/LumberMill-0.9.5.7-py3-none-any.whl/lumbermill/constants.py | import os
import sys
import types
import logging
import socket
try:
import zmq
ZMQ_AVAILABLE = True
except ImportError:
ZMQ_AVAILABLE = False
try:
import msgpack
MSGPACK_AVAILABLE = True
except ImportError:
MSGPACK_AVAILABLE = False
try:
import __pypy__
IS_PYPY = True
except ImportEr... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/utils/module_loading.py | import imp
import os
import sys
def module_has_submodule(package, module_name):
"""See if 'module' is in 'package'."""
name = ".".join([package.__name__, module_name])
try:
# None indicates a cached miss; see mark_miss() in Python/import.c.
return sys.modules[name] is not None
except K... | PypiClean |
/KratosStructuralMechanicsApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/StructuralMechanicsApplication/trilinos_convergence_criteria_factory.py | import KratosMultiphysics
# Import applications
import KratosMultiphysics.TrilinosApplication as TrilinosApplication
# Convergence criteria class
class convergence_criterion:
def __init__(self, convergence_criterion_parameters):
# Note that all the convergence settings are introduced via a Kratos paramet... | PypiClean |
/Kamaelia-0.6.0.tar.gz/Kamaelia-0.6.0/Examples/SoC2006/THF/MiniExamples/Intersect.py | from math import *
class Intersect:
""" A collection of static intersection functions. """
# very small value
epsilon = 0.00000001
def ray_OBB(r_origin, r_dir, b_pos, b_orientation, b_halflengths):
"""\
Intersects a ray with an oriented bounding box.
Arguments:
... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/spatialneuron/morphology.py | import abc
import numbers
import os
from abc import abstractmethod
from collections import OrderedDict, defaultdict, namedtuple
from brian2 import numpy as np
from brian2.units.allunits import meter
from brian2.units.fundamentalunits import Quantity, check_units, have_same_dimensions
from brian2.units.stdunits import ... | PypiClean |
/KolejkaServer-0.1.202308091427-py3-none-any.whl/kolejka/server/queue/views.py |
from django.conf import settings
import json
from django.contrib.contenttypes.models import ContentType
from django.db import transaction
from django.db.models import F, Count
from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseNotFound, HttpResponseNotAllowed
import django.utils.t... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/jinja2/jinja2/idtracking.py | from ._compat import iteritems
from .visitor import NodeVisitor
VAR_LOAD_PARAMETER = "param"
VAR_LOAD_RESOLVE = "resolve"
VAR_LOAD_ALIAS = "alias"
VAR_LOAD_UNDEFINED = "undefined"
def find_symbols(nodes, parent_symbols=None):
sym = Symbols(parent=parent_symbols)
visitor = FrameSymbolVisitor(sym)
for node... | PypiClean |
/FairQt-2.2.0.tar.gz/FairQt-2.2.0/FQt/Dialog.py | from PyQt6 import uic, QtWidgets
from F import LIST, DICT, RE
from F.CLASS import FairClass
from .FTemplates import DEFAULT_TEMPLATE
"""
-> Everything/Widget should be named exactly the name
: QtDesigner -> btnSearch
: Class Variable -> btnSearch
: Action Function -> onClick_btnSearch
"""
VIEW_ELEMENTS =... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/geometry/mesh_utilities.py | import aerosandbox.numpy as np
from typing import Tuple
"""
Documentation of (points, faces) standard format, which is an unstructured mesh format:
Meshes are given here in the common (points, faces) format. In this format, `points` is a Nx3 array, where each row
gives the 3D coordinates of a vertex in the mesh. Ent... | PypiClean |
/MAVR-0.93.tar.gz/MAVR-0.93/scripts/snpcall/parallel_gvcf_call.py | __author__ = 'Sergei F. Kliver'
import argparse
from RouToolPa.Tools.GATK import HaplotypeCaller
from RouToolPa.Tools.GATK4 import HaplotypeCaller4
parser = argparse.ArgumentParser()
parser.add_argument("-b", "--bam_with alignment", action="store", dest="alignment", required=True,
help="Bam file w... | PypiClean |
/Flask_HTTPAuth-4.8.0-py3-none-any.whl/flask_httpauth.py | import hmac
from base64 import b64decode
from functools import wraps
from hashlib import md5
from random import Random, SystemRandom
from flask import request, make_response, session, g, Response, current_app
from werkzeug.datastructures import Authorization
class HTTPAuth(object):
def __init__(self, scheme=None,... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/js/inlines.min.js | var $jscomp={scope:{},findInternal:function(b,c,a){b instanceof String&&(b=String(b));for(var d=b.length,e=0;e<d;e++){var f=b[e];if(c.call(a,f,e,b))return{i:e,v:f}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new Ty... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/model/initial_data/auth_data.py | from argonaut.model.meta import Session, Base
from argonaut.model.auth import User, Group, Permission, User_Group, Group_Permission
user_values = [
[1,'admin','admin@change.this.to.a.real.domain','admin','Administrator']
]
group_values = [
[1,'Administrator'],
[2,'Editor']
... | PypiClean |
/CGlue-0.2.4.tar.gz/CGlue-0.2.4/cglue/utils/version.py | import re
version_re = re.compile('(?P<major>\\d+?)\\.(?P<minor>\\d+?)(\\.(?P<rev>\\d+))?(-(?P<branch>.*?))?$')
constraint_re = re.compile('(?P<start>[\\[(])(?P<min>.*?),\\s?(?P<max>.*?)?(?P<end>[\\])])?$')
def cmp(a, b):
return -1 if a < b else 1
class FormatError(Exception):
pass
class Version:
de... | PypiClean |
/BT_Tracker-0.2.5-py3-none-any.whl/Tracker/spider.py |
import re
from urllib import request
from urllib import error
from typing import List, Tuple, Text, NoReturn
from .event import status
# Type hint
Trackers = Tuple[str, int]
UpdateTime = Tuple[list, list]
UpdateData = Tuple[str, List[str]]
# URLS
URL = "https://github.com/ngosang/trackerslist"
URL2 = "https://ra... | PypiClean |
/Lunas-0.5.1-py3-none-any.whl/lunas/dataset/generic.py | from __future__ import annotations
import glob
import itertools
import math
import pathlib
from typing import *
import lunas.dataset.core as core
__all__ = ['Array', 'Range', 'Zip', 'Glob']
class Array(core.Dataset, core.Sizable):
"""A dataset that wraps around any data as an iterable array.
This dataset ... | PypiClean |
/LCSFinder-1.1.0.tar.gz/LCSFinder-1.1.0/README.md | ### FastMatch
A package for quickly calculating longest common substrings with a fixed starting location of one substring. Once the two strings, $s_1$ and $s_2$ are defined, this package can be used to find the length of the longest substring that starts in the range s2[0..j) and matches a prefix of the string s1[i..n... | PypiClean |
/Mothership-0.0.35.zip/Mothership-0.0.35/mothership/mgmt_vlan/__init__.py | import mothership
import subprocess
# Useful handy functions brought in from mothership
from mothership.kv import collect as kv_collect
from mothership.kv import select as kv_select
# All of the models and sqlalchemy are brought in
# to simplify referencing
from mothership.mothership_models import *
def enable(cfg,... | PypiClean |
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/methods/messages/search_messages_count.py |
from typing import Union
import hikkapyro
from hikkapyro import raw, enums
class SearchMessagesCount:
async def search_messages_count(
self: "hikkapyro.Client",
chat_id: Union[int, str],
query: str = "",
filter: "enums.MessagesFilter" = enums.MessagesFilter.EMPTY,
from_us... | PypiClean |
/FAT-Forensics-0.1.2.tar.gz/FAT-Forensics-0.1.2/fatf/accountability/models/measures.py |
from numbers import Number
from typing import List
import numpy as np
__all__ = ['systematic_performance_bias', 'systematic_performance_bias_grid']
def systematic_performance_bias(metrics_list: List[float],
threshold: float = 0.8) -> bool:
"""
Checks for a systematic bias in... | PypiClean |
/DDPG-TF-2.0.3.tar.gz/DDPG-TF-2.0.3/ddpg/buffer.py | from collections import deque
import random
import numpy as np
class Replay_Buffer:
def __init__(self, max_buffer_size, batch_size, dflt_dtype):
# self.max_buffer_size = 1000000
self.batch_size = batch_size
self.buffer = deque(maxlen=max_buffer_size)
self.dflt_dtype = dflt_dtype
... | PypiClean |
/HySpec-0.1.4.4.tar.gz/HySpec-0.1.4.4/spectralAdv/imageViewer.py | from __future__ import division
import time
import sys
import os
import csv
from math import *
import matplotlib
import matplotlib.pyplot as plt
#matplotlib.use('Qt4Agg')
from spectral import *
from spectralAdv import *
from . import specTools
from . import spectraViewer
from . import imageViewerDialogs
from . import s... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/elementtree/HTMLTreeBuilder.py |
##
# Tools to build element trees from HTML files.
##
from __future__ import absolute_import
from six.moves import html_entities
import re, string, sys
import mimetools, StringIO
from . import ElementTree
import six
AUTOCLOSE = "p", "li", "tr", "th", "td", "head", "body"
IGNOREEND = "img", "hr", "meta", "link", "br... | PypiClean |
/BigchainDBNext-2.2.2.1.tar.gz/BigchainDBNext-2.2.2.1/bigchaindb/utils.py |
import contextlib
import threading
import queue
import multiprocessing as mp
import json
import setproctitle
from packaging import version
from bigchaindb.version import __tm_supported_versions__
from bigchaindb.tendermint_utils import key_from_base64
from bigchaindb.common.crypto import key_pair_from_ed25519_key
c... | PypiClean |
/FreeGS-0.8.0-py3-none-any.whl/freegs/shaped_coil.py | from . import quadrature
from . import polygons
from .gradshafranov import Greens, GreensBr, GreensBz
from shapely.geometry import Polygon
import numpy as np
from .coil import Coil
class ShapedCoil(Coil):
"""
Represents a coil with a specified shape
public members
--------------
R, Z - Locatio... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Node/__init__.py | import collections
import copy
from itertools import chain, zip_longest
import SCons.Debug
import SCons.Executor
import SCons.Memoize
from SCons.compat import NoSlotsPyPy
from SCons.Debug import logInstanceCreation, Trace
from SCons.Util import hash_signature, is_List, UniqueList, render_tree
print_duplicate = 0
def... | PypiClean |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/flac3d/_flac3d.py | from __future__ import annotations
import re
import struct
import time
import numpy as np
from ..__about__ import __version__ as version
from .._common import warn
from .._exceptions import ReadError
from .._files import open_file
from .._helpers import register_format
from .._mesh import Mesh
meshio_only = {
"... | PypiClean |
/OctoBot-Tentacles-Manager-2.9.4.tar.gz/OctoBot-Tentacles-Manager-2.9.4/octobot_tentacles_manager/api/configurator.py | import os.path as path
import sys
import octobot_commons.tentacles_management as tentacles_management
import octobot_tentacles_manager.api as api
import octobot_tentacles_manager.configuration as configuration
import octobot_tentacles_manager.constants as constants
import octobot_tentacles_manager.util as util
import... | PypiClean |
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/oauth2/rfc6749/authorization_server.py | from .authenticate_client import ClientAuthentication
from .requests import OAuth2Request, JsonRequest
from .errors import (
OAuth2Error,
InvalidScopeError,
UnsupportedResponseTypeError,
UnsupportedGrantTypeError,
)
from .util import scope_to_list
class AuthorizationServer(object):
"""Authorizatio... | PypiClean |
/InternetArgumentCorpus-1.0.1.tar.gz/InternetArgumentCorpus-1.0.1/iacorpus/datasets/generic/orm/quote.py | import re
import operator
from collections import namedtuple
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import relationship, reconstructor
from iacorpus.utilities.misc import lazy_property
QuoteFullID = namedtuple('QuoteFullID', ['discussion_id', 'post_id', 'quote_index'])
class QuoteM... | PypiClean |
/APIxoo-0.3.1.tar.gz/APIxoo-0.3.1/apixoo/pixel_bean.py | from typing import Union
from PIL import Image
class PixelBean(object):
@property
def total_frames(self):
return self._total_frames
@property
def speed(self):
return self._speed
@property
def row_count(self):
return self._row_count
@property
def column_count... | PypiClean |
/Cantonese-1.0.7-py3-none-any.whl/src/register_vm.py | from enum import Enum, unique
from typing import Dict
from collections import namedtuple
@unique
class CanType(Enum):
NONE = -1
NULL = 0
BOOLEAN = 1
L_USER_DATA = 2
NUMBER = 3
STRING = 4
FUNCTION = 5
USER_DATA = 6
THREAD = 7
LIST = 8
DICT = 9
class CanValue(object):
@st... | PypiClean |
/CatalanTTSo-0.0.1.tar.gz/CatalanTTSo-0.0.1/tts/gen_forward.py | import argparse
from pathlib import Path
from typing import Tuple, Dict, Any, Union
import numpy as np
import torch
from models.fast_pitch import FastPitch
from models.fatchord_version import WaveRNN
from models.forward_tacotron import ForwardTacotron
from utils.checkpoints import init_tts_model
from utils.display imp... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/codegen/generators/cpp_generator.py | import itertools
import numpy
from brian2.codegen.cpp_prefs import C99Check
from brian2.core.functions import DEFAULT_FUNCTIONS, Function
from brian2.core.preferences import BrianPreference, prefs
from brian2.core.variables import ArrayVariable
from brian2.parsing.rendering import CPPNodeRenderer
from brian2.utils.lo... | PypiClean |
/DLTKDL-51.0.8-py3-none-any.whl/dltkdl/optimizer/lrfinder.py | from ..imports import *
from .. import utils as U
class LRFinder:
"""
Tracks (and plots) the change in loss of a Keras model as learning rate is gradually increased.
Used to visually identify a good learning rate, given model and data.
Reference:
Original Paper: https://arxiv.org/abs/1506.0118... | PypiClean |
/Moose-0.9.9b3.tar.gz/Moose-0.9.9b3/moose/utils/progressbar/widgets.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
import abc
import sys
import pprint
import datetime
from python_utils import converters
from moose.utils import six
from . import... | PypiClean |
/AnyMetaAPI-1.15.tar.gz/AnyMetaAPI-1.15/anymeta/gtk/registry.py | import re
import gtk
from anymeta.api.oauth.oauth import OAuthError
from anymeta.api.registry import AnyMetaRegistry
def sibpath(frm, to):
"""
Clone from Twisted's sibpath.
"""
import os
return os.path.join(os.path.dirname(frm), to)
class GladeDialog (gtk.Dialog):
"""
A generic class... | PypiClean |
/CoolAMQP-1.2.15.tar.gz/CoolAMQP-1.2.15/coolamqp/attaches/channeler.py | from __future__ import print_function, absolute_import, division
import logging
import typing as tp
from coolamqp.framing.definitions import ChannelOpen, ChannelOpenOk, \
ChannelClose, ChannelCloseOk, BasicCancel, \
BasicCancelOk
from coolamqp.framing.frames import AMQPMethodFrame
ST_OFFLINE = 0 # Consumer ... | PypiClean |
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/isom/python/Macros_e_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 |
/Beeswarm-0.7.18.tar.gz/Beeswarm-0.7.18/beeswarm/drones/client/baits/pop3.py |
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along... | PypiClean |
/L1L2Signature-0.2.4.tar.gz/L1L2Signature-0.2.4/scripts/l1l2_run.py | import os
import imp
import shutil
import cPickle as pkl
import numpy as np
import pplus
import l1l2py
from l1l2signature import internals as l1l2_core
from l1l2signature import utils as l1l2_utils
def main(config_path):
# Configuration File
config_dir = os.path.dirname(config_path)
config = imp.load_so... | PypiClean |
/NonameOrm-1.2.3.tar.gz/NonameOrm-1.2.3/README.md | # NoNameOrm
NoNameOrm 是一个基于 Cython 开发的对象关系映射工具俗称ORM,让用户可以用Python的语法来生成SQL语句,同时它具有更高的性能表现和健全的类型提示功能
> 💡 : 有关Python的类型声明及相关功能,请参考[《Python官方文档》]()
GITHUB:[https://github.com/OToNaShi-4/NoNameOrm.git](https://github.com/OToNaShi-4/NoNameOrm.git)
GITEE:[https://gitee.com/otonashi-4/no-name-orm](https://gitee.com/otonas... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/_RST/_TOP/from_nav_list_file.py |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from _GTW import GTW
from _ReST import ReST
from _TFL import TFL
from _CAL.Date_Time ... | PypiClean |
/Banyan-0.1.5.tar.gz/Banyan-0.1.5/docs/_static/sidebar.js | $(function() {
// global elements used by the functions.
// the 'sidebarbutton' element is defined as global after its
// creation, in the add_sidebar_button function
var bodywrapper = $('.bodywrapper');
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
// for some reaso... | PypiClean |
/Newname-0.0.1.tar.gz/Newname-0.0.1/rds_uploader/rds_scraped_ebay_cars.py | import sys
import os.path
#sys.path.append(os.path.join(os.path.dirname(__file__), r'C:\Users\Simeon\PycharmProjects\car_scraper_packages'))
from car_scraper.car_scraping_1 import Carscraper
#import boto3
import psycopg2
from sqlalchemy import create_engine
import os
import pandas as pd
class DataHandling:
def _... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/utils/batch-jobs/parse_recipes_output.py | import datetime
import os
import glob
# User change needed
# directory where SLURM output files (.out and .err) are
# written to, e.g. on Levante for user b382109
# SLURM_OUT_DIR = "/home/b/b382109/output_v270"
SLURM_OUT_DIR = ""
# SLURM output file pattern (extension); usually all SLURM
# output is held in .out, un... | PypiClean |
/OctoBot-Tentacles-Manager-2.9.4.tar.gz/OctoBot-Tentacles-Manager-2.9.4/octobot_tentacles_manager/managers/tentacle_manager.py | import os
import os.path as path
import shutil
import octobot_commons.logging as logging
import octobot_tentacles_manager.constants as constants
import octobot_tentacles_manager.managers as managers
import octobot_tentacles_manager.util as util
class TentacleManager:
def __init__(self, tentacle, bot_installati... | PypiClean |
/ForceSpectroscopyHelperMCM-mcm-0.0.0.tar.gz/ForceSpectroscopyHelperMCM-mcm-0.0.0/ForceSpectroscopyHelperMCM/bayesData.py | import pandas as pd
import numpy as np
import os
from io import StringIO
import matplotlib.pyplot as plt
from scipy.stats import norm
import pymc3
import ForceSpectroscopyHelperMCM.Utils.ConsoleColor as color
import ForceSpectroscopyHelperMCM as mcm
import ForceSpectroscopyHelper as fsh
import scipy.stats as stats
"... | PypiClean |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/model/managers/lasers/PulseStreamerLaserManager.py | from imswitch.imcommon.model import initLogger
from .LaserManager import LaserManager
class PulseStreamerLaserManager(LaserManager):
""" LaserManager for controlling Pulse Streamer 8/2 from Swabian Instruments.
Manager properties:
- ``digitalChannel`` -- streamer digital output (0 to 7)
- ``analogCh... | PypiClean |
/Flask-Ask-alphavideo-2.1.0.tar.gz/Flask-Ask-alphavideo-2.1.0/flask_ask_alphavideo/verifier.py | import os
import base64
import posixpath
from datetime import datetime
from six.moves.urllib.parse import urlparse
from six.moves.urllib.request import urlopen
from OpenSSL import crypto
from . import logger
class VerificationError(Exception): pass
def load_certificate(cert_url):
if not _valid_certificate_url... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/Domain/Variables/Leafs/Checksums/CRC32.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/FreeClimb-4.5.0-py3-none-any.whl/freeclimb/model/record_utterance.py | import re # noqa: F401
import sys # noqa: F401
from freeclimb.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,
vali... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/docs/discussion/overview_of_past_tournaments.rst | Overview of past Tournaments
============================
Axelrod's first tournament
--------------------------
Axelrod's first tournament is described in his 1980 paper entitled `'Effective
choice in the Prisoner's Dilemma' <http://www.jstor.org/stable/173932>`_ [Axelrod1980]_. This
tournament included 14 strategies... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/docs/source/users/options/minimizer_option.rst | .. _minimizer_option:
===================
Minimizer Options
===================
This section is used to declare the minimizers to use for each fitting
software. If a fitting software has been selected in :ref:`fitting_option`
then a default set of minimizers for that solver will be run unless alternative
minimizer o... | PypiClean |
/Maisie_Sphinx_Theme-0.1.2-py3-none-any.whl/maisie_sphinx_theme/maisie_sphinx_theme/static/jquery.js | //@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g... | PypiClean |
/Figures-0.4.4-py3-none-any.whl/figures/pipeline/site_daily_metrics.py | from __future__ import absolute_import
from django.db.models import Sum
from figures.course import Course
from figures.helpers import as_course_key, as_datetime, next_day
from figures.mau import site_mau_1g_for_month_as_of_day
from figures.models import CourseDailyMetrics, SiteDailyMetrics
from figures.sites import (... | PypiClean |
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/static/pylot/vendor/mdeditor/bower_components/codemirror/keymap/emacs.js | (function() {
"use strict";
var Pos = CodeMirror.Pos;
function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
// Kill 'ring'
var killRing = [];
function addToRing(str) {
killRing.push(str);
if (killRing.length > 50) killRing.shift();
}
function growRingTop(str) {
if (!killRing.l... | PypiClean |
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/types/messages_and_media/message.py |
import logging
from datetime import datetime
from functools import partial
from typing import List, Match, Union, BinaryIO, Optional, Callable
import hikkapyro
from hikkapyro import raw, enums
from hikkapyro import types
from hikkapyro import utils
from hikkapyro.errors import MessageIdsEmpty, PeerIdInvalid
from hikk... | PypiClean |
/Fortpy-1.7.7.tar.gz/Fortpy-1.7.7/fortpy/isense/__init__.py | from . import cache
import fortpy.debug as debug
from . import context
from . import evaluator
import re
import os
import fortpy.settings as settings
from .classes import BaseDefinition
class Script(object):
"""
A Script is the base for completions, goto or whatever you want to do with
|fortpy|. This is mo... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/editor/plugins/UploadImage.js | if(!dojo._hasResource["dojox.editor.plugins.UploadImage"]){
dojo._hasResource["dojox.editor.plugins.UploadImage"]=true;
dojo.provide("dojox.editor.plugins.UploadImage");
dojo.require("dijit._editor._Plugin");
dojo.require("dojox.form.FileUploader");
dojo.experimental("dojox.editor.plugins.UploadImage");
dojo.declare("d... | PypiClean |
/DI-toolkit-0.2.0.tar.gz/DI-toolkit-0.2.0/ditk/doc/annotated/__main__.py | from functools import partial
import click
from click.core import Context, Option
from ditk import logging
from ditk.config.meta import __VERSION__
from .generate import generate_annotated_doc, Lang
GLOBAL_CONTEXT_SETTINGS = dict(
help_option_names=['-h', '--help']
)
def print_version(module, ctx: Context, par... | PypiClean |
/ACAutomaton-1.0.3.tar.gz/ACAutomaton-1.0.3/README.md | # About
ACAutomaton Python Package
High-performance multi-string lookup data structure
# Notice
1. If you want to insert unicode string, please encode them to byte string first.
2. Once you insert a new word to ACAutomaton, please remember call build method. You can call build method multiple times.
# Install
... | PypiClean |
/FirestoreExtractor-1.7.tar.gz/FirestoreExtractor-1.7/FirestoreExtractor.py | import firebase_admin
from firebase_admin import *
from firebase_admin import firestore
import json
from firebase_admin import credentials
from firebase_admin import db
from datetime import datetime
import datetime
def extractFromFirebase(certificate_json_file_path,firebase_url):
cred = credentials.Certificate... | PypiClean |
/EXtra_data-1.14.0-py3-none-any.whl/extra_data/run_files_map.py | import json
import logging
import os
import os.path as osp
import numpy as np
import re
from tempfile import mkstemp
import time
SCRATCH_ROOT_DIR = "/gpfs/exfel/exp/"
log = logging.getLogger(__name__)
def atomic_dump(obj, path, **kwargs):
"""Write JSON to a file atomically
This aims to avoid garbled files f... | PypiClean |
/CRIkit2-0.4.4.tar.gz/CRIkit2-0.4.4/crikit/ui/widget_Jupyter.py | import os
os.environ['QT_API'] = 'pyqt5'
from PyQt5 import QtWidgets
from PyQt5 import QtGui
# ipython won't work if this is not correctly installed. And the error message will be misleading
from PyQt5 import QtSvg
# Import the console machinery from ipython
from qtconsole.rich_jupyter_widget import RichJupyterWidge... | PypiClean |
/Finance-Jindowin-1.3.3.tar.gz/Finance-Jindowin-1.3.3/jdw/mfc/experimental/DataAPI/mg/operator_engine.py | import os
from pymongo import InsertOne, DeleteOne
from pymongo.errors import BulkWriteError
from jdw.kdutils.data.mongodb import MongoDBManager
from jdw.kdutils.logger import kd_logger
class MGEngine(object):
def __init__(self, uri):
self._engine = MongoDBManager(uri=uri)
self._collection = uri.... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/domexception/lib/utils.js | "use strict";
// Returns "Type(value) is Object" in ES terminology.
function isObject(value) {
return typeof value === "object" && value !== null || typeof value === "function";
}
function getReferenceToBytes(bufferSource) {
// Node.js' Buffer does not allow subclassing for now, so we can get away with a prototyp... | PypiClean |
/GLAM-0.3.7-py3-none-any.whl/glam/parsing/rnn/_rnn_model.py | from datetime import datetime
import tensorflow as tf
import os
from glam.parsing._dataset import vocab, n_labels
from glam.parsing import _train
def build_training_model():
embedding_dim = 8
rnn_size = 128
dense_dim = 32
dropout = 0.2
address = tf.keras.Input((None,),name='address_ints',dt... | PypiClean |
/AutoFeatSelect-0.1.4-py3-none-any.whl/autofeatselect/auto_feat_select.py | import pandas as pd
import numpy as np
import random
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.pipeline import Pipeline
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import FunctionTransformer, OneHotEncoder, StandardScaler, MinMaxScaler
from sklearn.impute import Si... | PypiClean |
/Jord-0.1.5.tar.gz/Jord-0.1.5/jord/qgis_utilities/helpers/actions.py | from typing import Any
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QAction, QWidget
from jord.qgis_utilities.helpers.signals import reconnect_signal
__all__ = ["create_action"]
def create_action(
icon_path: str,
text: str,
callback: callable,
enabled_flag: bool = True,
toolbar: A... | PypiClean |
/Flask-Blogging-2.0.0.post2.tar.gz/Flask-Blogging-2.0.0.post2/example/blog_roles.py | from flask import Flask, render_template_string, redirect, current_app
from sqlalchemy import create_engine, MetaData
from flask_login import UserMixin, LoginManager, login_user, logout_user, current_user
from flask_blogging import SQLAStorage, BloggingEngine
from flask_principal import identity_changed, Identity, Anon... | PypiClean |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/examples/xsede2013/CDS-02_bigjob-simple-ensemble-datatransfer.py | import os
import sys
import saga # <=== !!
import pilot
import traceback
""" This tutorial example extends and improves the first example
(01_bigjob-simple-ensemble.py) by adding file transfer: once the tasks have
finished executing, we use SAGA-Python to transfer the individual output
files back to the... | PypiClean |
/Imgscii-1.0.2.zip/Imgscii-1.0.2/imgscii/imgscii.py | import os.path as path
import argparse
from PIL import Image
from colorama import init, deinit, Fore, Style
import colorsys
ASCII_CHARS = ("#", "?", "%", "$", "Q", "+", ",", "j", "*", "~", "`", ".")
def main():
"""Accept user input and use the provided information to open an image
and create an ASCII repres... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/post_training_quantization.py | """Export quantized tflite model from a trained checkpoint."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
from absl import app
from absl import flags
import tensorflow.compat.v1 as tf
import tensorflow_datasets as tfds
from nets import... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/theme-dawn.js | ace.define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-dawn";
exports.cssText = ".ace-dawn .ace_gutter {\
background: #ebebeb;\
color: #333\
}\
.ace-dawn .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ac... | PypiClean |
/KalturaApiClient-19.3.0.tar.gz/KalturaApiClient-19.3.0/KalturaClient/Plugins/Velocix.py | from __future__ import absolute_import
from .Core import *
from ..Base import (
getXmlNodeBool,
getXmlNodeFloat,
getXmlNodeInt,
getXmlNodeText,
KalturaClientPlugin,
KalturaEnumsFactory,
KalturaObjectBase,
KalturaObjectFactory,
KalturaParams,
KalturaServiceBase,
)
########## enu... | PypiClean |
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/imports/G2img_HDF5.py | from __future__ import division, print_function
try:
import h5py
except ImportError:
h5py = None
import GSASIIobj as G2obj
import GSASIIpath
GSASIIpath.SetVersionNumber("$Revision: 3361 $")
class HDF5_Reader(G2obj.ImportImage):
'''Routine to read a HD5 image, typically from APS Sector 6.
B. Frosik/SDM.... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.