id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/savings_meter_bill_response_py3.py |
from msrest.serialization import Model
class SavingsMeterBillResponse(Model):
"""SavingsMeterBillResponse.
:param bill_mtr_cap_id: Unique ID for this savings record (Bill Meter CAP)
:type bill_mtr_cap_id: int
:param bill_id: Unique ID of the bill processed for this savings record
:type bill_id: ... | PypiClean |
/NREL_disco-0.4.2-py3-none-any.whl/disco/sources/source_tree_2/source_tree_2_model_inputs.py | from collections import namedtuple
import enum
import logging
import os
import re
from jade.jobs.job_inputs_interface import JobInputsInterface
from jade.exceptions import InvalidParameter
from jade.utils.utils import handle_file_not_found, handle_key_error
from disco.enums import get_placement_from_value, get_scale_f... | PypiClean |
/MozillaPulse-1.3.tar.gz/MozillaPulse-1.3/mozillapulse/publishers.py |
from datetime import datetime
from kombu import Connection, Exchange, Producer
from pytz import timezone
from .config import PulseConfiguration
from .utils import time_to_string
# Exceptions we can raise
class InvalidExchange(Exception):
pass
class MalformedMessage(Exception):
pass
class GenericPublish... | PypiClean |
/MagnetiCalc-1.15.2.tar.gz/MagnetiCalc-1.15.2/magneticalc/Perspective_Presets.py |
# ISC License
#
# Copyright (c) 2020–2022, Paul Wilhelm, M. Sc. <anfrage@paulwilhelm.de>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# TH... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/shadycss/src/scoping-shim.js | 'use strict';
import {parse, StyleNode} from './css-parse.js';
import {nativeShadow, nativeCssVariables} from './style-settings.js';
import StyleTransformer from './style-transformer.js';
import * as StyleUtil from './style-util.js';
import StyleProperties from './style-properties.js';
import placeholderMap from './st... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/build/lib/gqcms/__init__.py | from gqcms.matrices import Determinant
from gqcms.matrices import NumberOperator
from gqcms.matrices import DensityOperator
from gqcms.matrices import basisTransform
from gqcms.matrices import createHamiltonian
from gqcms.matrices import createHamiltonianSCI
from gqcms.basis import seniorityBasis
# Molecule
from gqcm... | PypiClean |
/OceanMonkey-1.0.0.tar.gz/OceanMonkey-1.0.0/oceanmonkey/core/response.py | from parsel import Selector
class Response:
def __init__(self, url, page_source,
status_code=200,
headers = {},
meta=None,
callback=None,
repeated=False):
self.__url = url
self.__page_source = page_source
... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-asciidoc.min.js | !function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"... | PypiClean |
/FeaSel-Net-0.0.9.tar.gz/FeaSel-Net-0.0.9/src/feasel/linear/base.py | import numpy as np
from ..data import regression
from ..parameter import ParamsLinear
from ..plot import LinearTransformationVisualizer as Visualizer
from ..utils.time import get_timestamp
class ModelContainer:
def __init__(self, X, y=None,
features=None,
name=None,
**kw... | PypiClean |
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/file_comment_reaction.py | import builtins
import datetime
from files_sdk.api import Api
from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError
class FileCommentReaction:
default_attributes = {
'id': None, # int64 - Reaction ID
'emoji': None, # string - Emoji used in the re... | PypiClean |
/NEMO_transaction_validation-0.2.11.tar.gz/NEMO_transaction_validation-0.2.11/NEMO_transaction_validation/models.py | from django.db import models
from NEMO.models import Tool, Project, User, UsageEvent, StaffCharge, AreaAccessRecord, Area
from mptt.fields import TreeForeignKey
# Create your models here.
class ContestUsageEvent(models.Model):
CONTEST_REASONS = [
('operator', 'Incorrect operator selection'),
('cust... | PypiClean |
/ElectronCounting-1.0.0.tar.gz/ElectronCounting-1.0.0/CountingNN/transform_custom.py | from typing import Any, Dict, List, Optional, Tuple
import torch
from torch import nn, Tensor
from torchvision.models.detection.image_list import ImageList
class GeneralizedRCNNTransform(nn.Module):
"""
Performs input / target transformation before feeding the data to a GeneralizedRCNN
model. Just keep c... | PypiClean |
/Neodroid-0.4.9-py36-none-any.whl/neodroid/utilities/unity_specifications/environment_description.py | from typing import Dict
from neodroid.messaging.fbs.FBSModels import FEnvironmentDescription
from neodroid.messaging.fbs.fbs_state_utilties import (
deserialise_actors,
deserialise_configurables,
deserialise_sensors,
)
from neodroid.utilities.spaces import ActionSpace, ObservationSpace, Range, SignalSpace
... | PypiClean |
/MathBench-1.1.0.tar.gz/MathBench-1.1.0/mathbench/lab/fumehood.py | import wx
# Load Python's logging utilities
import logging
import logging.handlers
from mathbench.basement.logging_utils import CreateLogger
class FumeHoodLogHandler(logging.StreamHandler):
"""
A log handler that will display the logged messages (above a
certain priprity level) in GUI windows.
"""
def __init_... | PypiClean |
/Fregger-0.10.7.tar.gz/Fregger-0.10.7/fregger/static/lang/geo.js | 'use strict';
/* jshint quotmark: double */
window.SwaggerTranslator.learn({
"Warning: Deprecated":"ყურადღება: აღარ გამოიყენება",
"Implementation Notes":"იმპლემენტაციის აღწერა",
"Response Class":"რესპონს კლასი",
"Status":"სტატუსი",
"Parameters":"პარამეტრები",
"Parameter":"პარამეტრი",
"Value... | PypiClean |
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/docs/setup/setup_dust.rst | Preparing dust properties
=========================
Arguably one of the most important inputs to the model are the dust
properties. At this time, Hyperion supports anisotropic wavelength-dependent
scattering of randomly oriented grains, using a 4-element Mueller matrix
(Chandrasekhar 1960; Code & Whitney 1995). See Se... | PypiClean |
/MOODS-python-1.9.4.1.tar.gz/MOODS-python-1.9.4.1/MOODS/parsers.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, '_parsers')).lstrip('.')
try:
return importlib.import_module(mname)
... | PypiClean |
/BenchExec-3.17.tar.gz/BenchExec-3.17/benchexec/tools/divine4.py |
from benchexec.tools.sv_benchmarks_util import get_data_model_from_task, ILP32, LP64
import benchexec.tools.template
import benchexec.result as result
import os
class Tool(benchexec.tools.template.BaseTool2):
"""
DIVINE tool info object
"""
BINS = ["divine", "divine-svc"]
RESMAP = {
"tr... | PypiClean |
/IPFX-1.0.8.tar.gz/IPFX-1.0.8/ipfx/qc_feature_extractor.py | from . import stim_features as stf
from . import epochs as ep
from . import error as er
import logging
import numpy as np
from . import qc_features as qcf
def extract_blowout(data_set, tags):
"""
Measure blowout voltage
Parameters
----------
data_set: EphysDataSet
tags: list
warning ... | PypiClean |
/DI-toolkit-0.2.0.tar.gz/DI-toolkit-0.2.0/ditk/tensorboard/log.py | import os
from typing import Dict
import pandas as pd
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator, SCALARS
from tqdm.auto import tqdm
def _init_acc_from_dir(log_dir: str) -> EventAccumulator:
event_acc = EventAccumulator(
log_dir,
size_guidance={SCALARS: 0}... | PypiClean |
/51job_autotest_framework-0.3.1-py3-none-any.whl/rolling_king/jason/crawler/TempBaidu.py |
import requests
from bs4 import BeautifulSoup
fileObj = open("/Users/admin/Desktop/baidu.html", mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
print("文件名: ", fileObj.name)
print("是否已关闭 : ", fileObj.closed)
print("访问模式 : ", fileObj.mode)
str_list = fileObj.readlines()
val ... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/plugins/labels/vtc.py | from functools import partial
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from electrum_vtc.plugins import hook
from electrum_vtc.i18n import _
from electrum_vtc_gui.qt import EnterButton
from electrum_vtc_gui.qt.util import ThreadedButton, Buttons
from electrum_vtc_gui.qt.util import WindowModalDialog, OkBu... | PypiClean |
/ILAMB-2.7.tar.gz/ILAMB-2.7/LICENSE.rst | Copyright 2023, The ILAMB Consortium
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redist... | PypiClean |
/Mailchimp%20Python-0.1.12.tar.gz/Mailchimp Python-0.1.12/mailchimp/objects/mc_interest.py | import logging
from mailchimp.exceptions import MCInterestNotFound, MCCategoryListNotFound, ObjectNotFound
from mailchimp import Request
from .base_object import BaseObject
from .mc_link import MCLink
logger = logging.getLogger(__name__)
class MCInterest(BaseObject):
item_url = '/lists/{list_id}/interest-categ... | PypiClean |
/KD_Lib-0.0.32.tar.gz/KD_Lib-0.0.32/KD_Lib/Quantization/common/base_class.py | import os
import time
import torch
class Quantizer:
"""
Basic Implementation of Quantization for PyTorch models.
:param model: Model that needs to be pruned
:type model: torch.nn.Module
:param qconfig: Configuration used for quantization
:type qconfig: Qconfig
:param train_loader: DataLo... | PypiClean |
/Amino_new.py-5.0.tar.gz/Amino_new.py-5.0/new/lib/util/headers.py | from amino.lib.util import device
from amino import client
sid = None
gen_msg_sig = None
web = None
class Headers:
def __init__(self, data = None, type = None, deviceId: str = None, sig: str = None,sid:str=None):
if deviceId:
dev = device.DeviceGenerator(deviceId=deviceId)
else:
... | PypiClean |
/EmailNotice-1.2.5-py3-none-any.whl/era/Service/emailService.py | from email.mime.application import MIMEApplication
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from string import Template
from era.Database.Model.emailTemplateModel import EmailTemplateModel
from era.Database.Model.recipientModel import Rec... | PypiClean |
/Flickr-nqcuong96-1.1.2.tar.gz/Flickr-nqcuong96-1.1.2/Flickr/model/flickr.py | import hashlib
import iso3166
import json
import os
import os.path
import requests
from iso639 import languages
from langdetect import detect
from enum import Enum
KEY = "528d93670837d5dca4956f67ba67d91a"
SECRECT = "8491051899d2c67a"
LINK = "https://www.flickr.com/services/rest/?method=flickr.people.findByUsername&api... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/ol-2.13/lib/OpenLayers/Format/WMSGetFeatureInfo.js | * @requires OpenLayers/Format/XML.js
*/
/**
* Class: OpenLayers.Format.WMSGetFeatureInfo
* Class to read GetFeatureInfo responses from Web Mapping Services
*
* Inherits from:
* - <OpenLayers.Format.XML>
*/
OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
/**
* APIPrope... | PypiClean |
/GB2260-v2-0.2.1.tar.gz/GB2260-v2-0.2.1/gb2260_v2/data/curated/revision_201012.py | from __future__ import unicode_literals
name = '201012'
division_schema = {
'110000': '北京市',
'110101': '东城区',
'110102': '西城区',
'110105': '朝阳区',
'110106': '丰台区',
'110107': '石景山区',
'110108': '海淀区',
'110109': '门头沟区',
'110111': '房山区',
'110112': '通州区',
'110113': '顺义区',
'11011... | PypiClean |
/ImageButler-0.0.4.tar.gz/ImageButler-0.0.4/imagebutler/apis/image.py | from .apis import Resource, reqparse
from ..imagebutler import rdb
from ..models import db, ImageModel, UserModel
from ..utils import user_identity_check
from ..job_workers import worker_undo_cached_redis
from werkzeug.datastructures import FileStorage
put_parser = reqparse.RequestParser()
put_parser.add_argument('us... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/signal-exit/README.md | # signal-exit
[](https://travis-ci.org/tapjs/signal-exit)
[](https://coveralls.io/r/tapjs/signal-exit?branch=master)
[... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/test/runner.py | import ctypes
import itertools
import logging
import multiprocessing
import os
import pickle
import textwrap
import unittest
from importlib import import_module
from io import StringIO
from django.core.management import call_command
from django.db import connections
from django.test import SimpleTestCase, TestCase
fro... | PypiClean |
/NearPy-0.2.2.tar.gz/NearPy-0.2.2/nearpy/hashes/permutation/hashpermutationmapper.py |
# Copyright (c) 2013 Ole Krause-Sparmann
# 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 without limitation the rights
# to use, copy, modify, merge, publish,... | PypiClean |
/Flask-Graylog-1.1.2.tar.gz/Flask-Graylog-1.1.2/README.rst | Flask-Graylog
=============
This is a Flask_ extension that allows you to configure a Graylog_ log handler as well as configuring middleware to log every request/response to Graylog.
.. _Flask: http://flask.pocoo.org/
.. _Graylog: https://graylog.org
Installation
------------
You can install it via `pip`:
.. code:... | PypiClean |
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/prototypes/base/security/authentication_provider/memory/auth_provider_no_swagger.py | from security.authentication_provider.abstract_authentication_provider import Abstract_Authentication_Provider
from typing import List, Optional
from safrs import jsonapi_rpc
# **********************
# in mem auth provider
# **********************
users = {}
from dataclasses import dataclass
@dataclass
class DataCl... | PypiClean |
/Flask-Ecstatic-0.3.0.zip/Flask-Ecstatic-0.3.0/flask_ecstatic.py | __all__ = 'add handle404'.split()
__version__ = '0.3.0'
import os
from flask import abort, safe_join, send_file, send_from_directory
from functools import wraps
def add(app, url = None, path = None, endpoint=None, decorate=None, index='index.html', **options):
"""Adds static files endpoint with optional director... | PypiClean |
/Hyperstatic-0.2.0-cp38-cp38-win_amd64.whl/hyperstatic/core/fe_model/element/quad/TMGQ.py | import numpy as np
import scipy.sparse as spr
from hyperstatic.core.fe_model.meta.membranes import GQ12
from hyperstatic.core.fe_model.meta.plates import TMQ
from hyperstatic.core.fe_model.node import Node
from hyperstatic.core.fe_model.element.quad import Quad
from hyperstatic.core.fe_model.section.shell_section impor... | PypiClean |
/Office365_REST_with_timeout-0.1.1-py3-none-any.whl/office365/sharepoint/files/file_collection.py | import os
from office365.runtime.queries.service_operation_query import ServiceOperationQuery
from office365.runtime.resource_path_service_operation import ResourcePathServiceOperation
from office365.sharepoint.internal.create_file import create_file_query
from office365.sharepoint.internal.upload_session import Uploa... | PypiClean |
/CNFgen-0.9.2-py3-none-any.whl/cnfgen/formula/variables.py | from itertools import product
from itertools import combinations
from itertools import combinations_with_replacement
from itertools import permutations
from bisect import bisect_right
from math import ceil, log
from cnfgen.graphs import BaseBipartiteGraph, BipartiteGraph
from cnfgen.graphs import Graph, DirectedGrap... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/codeintel2/lang_less.py | from __future__ import absolute_import
from __future__ import print_function
import logging
from codeintel2.common import _xpcom_
from codeintel2.lang_css import CSSLexer, CSSLangIntel, CSSBuffer, \
CSSImportHandler, CSSCILEDriver
from codeintel2.lang_css import isident, WHITESPACE
from... | PypiClean |
/ASIO-1.1.zip/ASIO-1.1/src/asio/interfaces/posix.py |
from asio.file import File, DEFAULT_BUFFER_SIZE
from asio.interfaces.base import Interface
import sys
import os
if os.name == 'posix':
import select
# fcntl is only required on darwin
if sys.platform == 'darwin':
import fcntl
F_GETPATH = 50
class PosixInterface(Interface):
@classmethod
... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/kmerlimit2.sh |
usage(){
echo "
Written by Brian Bushnell
Last modified July 31, 2018
Description: Subsamples reads to reach a target unique kmer limit.
Differences between versions:
kmerlimit.sh uses 1 pass and outputs all reads until a limit is hit,
meaning the input reads should be in random order with respect to sequence.
kmer... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/doc/api_doc/inginious.common.task_file_readers.rst | inginious.common.task_file_readers package
==========================================
.. automodule:: inginious.common.task_file_readers
:members:
:undoc-members:
:show-inheritance:
Submodules
----------
inginious.common.task_file_readers.abstract_reader module
-------------------------------------------... | PypiClean |
/energon_prometheus_exporter_main-0.0.1.tar.gz/energon_prometheus_exporter_main-0.0.1/torchdistill-test/examples/torchvision/image_classification.py | import argparse
import datetime
import os
import time
import torch
from torch import distributed as dist
from torch.backends import cudnn
from torch.nn import DataParallel
from torch.nn.parallel import DistributedDataParallel
from torchdistill.common import file_util, yaml_util, module_util
from torchdistill.common.c... | PypiClean |
/Graphy-1.0.0.tar.gz/Graphy-1.0.0/graphy/pie_chart.py | import warnings
from graphy import common
from graphy import util
class Segment(common.DataSeries):
"""A single segment of the pie chart.
Object attributes:
size: relative size of the segment
label: label of the segment (if any)
color: color of the segment (if any)
"""
def __init__(self, size, l... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/formats/_ringstat.py | from genice2.decorators import timeit, banner
import genice2.formats
from logging import getLogger
import numpy as np
import fractions
from math import log
import networkx as nx
from collections import defaultdict
import sys
from cycless.cycles import cycles_iter
import itertools as it
desc = {
"ref": {
"Ho... | PypiClean |
/CheeseFramework-1.4.95-py3-none-any.whl/Cheese/resourceManager.py |
import os
import math
class ResMan:
"""
Resource manager
managing resources :D
bum pam pam
"""
@staticmethod
def setPath(path):
"""
set root path of project
"""
ResMan.path = str(path)
@staticmethod
def getFileName(path):
"""
retu... | PypiClean |
/FlaskFarm-4.0.104-py3-none-any.whl/flaskfarm/lib/support/expand/rclone.py | import json
import os
import traceback
from support import SupportSubprocess, d, logger
class SupportRclone(object):
__instance_list = []
__rclone_path = 'rclone'
__rclone_config_path = 'rclone.conf'
@classmethod
def initialize(cls, __rclone_path, __rclone_config_path):
cls.__rclone_pa... | PypiClean |
/3dof-hexapod-ik-generator-1.0.0.tar.gz/3dof-hexapod-ik-generator-1.0.0/sample/ikengine/__init__.py | from math import cos, sin, tan, acos, atan, atan2, pi
from timeit import timeit
class IKEngine:
def __init__(self, coxaLength, femurLength, tibiaLength, bodySideLength, reversed_servos_tuple=(19, 20, 21)): # Params to be given in millimetres. These equations only work with a hexapod with 3 degrees of freedom and legs... | PypiClean |
/Deprecated-1.2.14.tar.gz/Deprecated-1.2.14/.github/ISSUE_TEMPLATE.md | **This issue tracker is a tool to address bugs in Deprecated itself.
Please use Stack Overflow for general questions about using Deprecated
or issues not related to Deprecated Library.**
If you'd like to report a bug in Deprecated, fill out the template below. Provide
any extra information that may be useful/related t... | PypiClean |
/COMCscraper-0.0.2.tar.gz/COMCscraper-0.0.2/README.md | # COMCscraper
# Jared Randall
This is package has been built to scrape the website, Check Out My Cards (COMC). COMC is an online marketplace for buying and selling sports cards, trading cards, and other collectibles.
This package is strictly built for end users who wish to scrape data for personal use.
Please be co... | PypiClean |
/dipex-4.54.5.tar.gz/dipex-4.54.5/exporters/sql_export/sql_url.py | import logging
import urllib.parse
from enum import Enum
from functools import partial
from typing import Any
from typing import Dict
from typing import Optional
from typing import Tuple
from ra_utils.load_settings import load_settings
logger = logging.getLogger("SqlExport")
class DatabaseFunction(Enum):
ACTUA... | PypiClean |
/KratosPoromechanicsApplication-9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/PoromechanicsApplication/poromechanics_U_Pw_explicit_dynamic_solver.py | import KratosMultiphysics
# Import applications
import KratosMultiphysics.FluidDynamicsApplication as KratosCFD
import KratosMultiphysics.PoromechanicsApplication as KratosPoro
import KratosMultiphysics.StructuralMechanicsApplication as StructuralMechanicsApplication
# Import base class file
from KratosMultiphysics.P... | PypiClean |
/Flask-ShellPlus-0.0.3.tar.gz/Flask-ShellPlus-0.0.3/flask_shellplus/utils.py | from __future__ import print_function
import six
def import_items(import_directives, style=None, quiet_load=False):
"""Import items in import_directives and return a list of imported items
:param import_directives: target to be imported, should be a list of tuple in form of ``(module, target)``
:param sty... | PypiClean |
/GDM-0.8.2.tar.gz/GDM-0.8.2/docs/about/license.md | # License
**The MIT License (MIT)**
Copyright © 2016, Jace Browning
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 without limitation the rights
to use, copy... | PypiClean |
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/tokenizer/tokenization_bert.py | import collections
import logging
import os
import re
import unicodedata
from io import open
from .build import TOKENIZER_REGISTRY
from .tokenization_base import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
logger = logging.getLogger(__name__)
VOCAB_FILES_NAMES = {"vocab_file": "vocab.txt"}
PRE... | PypiClean |
/ExifReader-0.1.1-py3-none-any.whl/exifreader/tags/makernote/canon.py | TAGS = {
0x0003: ('FlashInfo',),
0x0006: ('ImageType', ),
0x0007: ('FirmwareVersion', ),
0x0008: ('ImageNumber', ),
0x0009: ('OwnerName', ),
0x000c: ('SerialNumber', ),
0x000e: ('FileLength', ),
0x0010: ('ModelID', {
0x1010000: 'PowerShot A30',
0x1040000: 'PowerShot S300 ... | PypiClean |
/NetLink-0.1-py3-none-any.whl/netlink/low/netif.py | import ctypes
import fcntl
import socket
import time
import netlink.struct.netif
class Socket:
###########################################
# Public ioctl() calls (from sys/ioctl.h) #
###########################################
# Routing table calls
SIOCADDRT = 0x890B # add routing table entry
SIOCDELRT = 0x8... | PypiClean |
/Hooke-1.0.0.alpha%20(Ninken).tar.gz/Hooke-1.0.0.alpha (Ninken)/hooke/ui/gui/interface.py | WX_GOOD=['2.9']
import wxversion
wxversion.select(WX_GOOD)
import copy
import logging
import os
import os.path
import platform
import shutil
import time
import wx
import wx.html
#import wx.aui as aui # C++ implementation
import wx.lib.agw.aui as aui # Python implementation
import wx.lib.evtmgr as evtmgr
# w... | PypiClean |
/MDAnalysis-2.1.0.tar.gz/MDAnalysis-2.1.0/doc/sphinx/source/documentation_pages/lib_modules.rst | .. _lib:
*******************************************
Library functions --- :mod:`MDAnalysis.lib`
*******************************************
.. module:: MDAnalysis.lib
:synopsis: ``lib`` collects independent code for re-use in MDAnalysis
:mod:`MDAnalysis.lib` contains code that is independent of the
specific MDAn... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/datastructures/network/duality.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from math import pi
from compas.utilities import pairwise
from compas.geometry import angle_vectors
from compas.geometry import is_ccw_xy
__all__ = [
"network_find_cycles",
]
PI2 = 2.0 * pi
def netwo... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/BootstrapValidator/js/language/id_ID.js | (function($) {
/**
* Indonesian language package
* Translated by @egig
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Silahkan isi karakter base 64 tersandi yang valid'
},
between: {
'default':... | PypiClean |
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_insight_transfer_no_tag/get.py | from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict
from firefly_iii_client import api_client, exceptions
from datetime import date, datetime # noqa: F401
import decimal # noqa: F401
import functools # noqa: F401
import io # noqa: F401
import re... | PypiClean |
/OPTMOD-0.0.1rc1.tar.gz/OPTMOD-0.0.1rc1/LICENSE.md | Copyright (c) 2019, Tomas Tinoco De Rubira.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the foll... | PypiClean |
/MkNxGn_Essentials-0.1.40.tar.gz/MkNxGn_Essentials-0.1.40/README.md | # mknxgn_essentials
Essentials for python programming.
This is the package we compile essentials code we use in our products that we deem as "essential".
Installing
```
pip3 install mknxng_essentials
```
# What's Inside
## essentials.file_ops
Read and Write Files.<br>
Includes:<br>
Wr... | PypiClean |
/IFJcode17-toolkit-1.4.13.tar.gz/IFJcode17-toolkit-1.4.13/README.md | # Sada nástrojů pro `IFJ17` a `IFJcode17`
[](https://badge.fury.io/py/IFJcode17-toolkit)
[](https://github.com/thejoeejoee/VUT-FIT-IFJ-2017-toolkit/issues)
[![Gi... | PypiClean |
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/cli/__init__.py | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
import sys
import click
import octoprint
from octoprint.cli.common import LazyGroup
click.disable_unicode_literals_warning ... | PypiClean |
/Flask-HTAuth-0.1.2.tar.gz/Flask-HTAuth-0.1.2/README.rst | Flask-HTAuth
============
**Flask-HTAuth** provides Flask apps with easy to integrate basic HTTP authentication. The extension supports standard htpasswd files.
Installation
------------
Install with the usual::
pip install flask-htauth
or download source from GitHub::
git clone https://github.com/tomekwo... | PypiClean |
/LFPy-2.3.tar.gz/LFPy-2.3/examples/LFPy-example-01.ipynb | ```
%matplotlib inline
```
# Example 1: Post-synaptic response of a single synapse #
This is an example of **``LFPy``** running in an **``Jupyter notebook``**. To run through this example code and produce output, press **``<shift-Enter>``** in each code block below.
First step is to `import LFPy` and other packages ... | PypiClean |
/DataTig-0.5.0.tar.gz/DataTig-0.5.0/datatig/readers/directory.py | import json
import os
from typing import Callable
import yaml
from datatig.models.error import ErrorModel
from datatig.models.record import RecordModel
from datatig.models.siteconfig import SiteConfigModel
from datatig.models.type import TypeModel
from datatig.repository_access import RepositoryAccess
# import trace... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","nl",{title:"Toegankelijkheidsinstructies",contents:"Help inhoud. Druk op ESC om dit dialoog te sluiten.",legend:[{name:"Algemeen",items:[... | PypiClean |
/OASYS1_HALF_SRW-0.0.3-py3-none-any.whl/orangecontrib/srw/widgets/gui/ow_srw_crystal.py | import os, numpy
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QMessageBox, QLabel, QSizePolicy
from PyQt5.QtGui import QPixmap
import orangecanvas.resources as resources
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets impo... | PypiClean |
/GailBot-0.2a0-py3-none-any.whl/gailbot/plugins/loader/urlloader.py | import os
import re
import boto3
from botocore.exceptions import ParamValidationError
from cryptography.fernet import Fernet
from typing import Dict, List, Union, TypedDict, Tuple
from abc import ABC
from .directoryloader import PluginDirectoryLoader
from .pluginLoader import PluginLoader
from ..suite import PluginSuit... | PypiClean |
/Dunner-0.0.1.6-py3-none-any.whl/dunner/data_operations.py | import feather
import dask.dataframe as dd
import pandas as pd
from multiprocessing import Pool, cpu_count
class DataOperations:
def process_Pandas_data(self,func, df, num_processes=None):
if num_processes == None:
num_processes = min(df.shape[1], cpu_count())
with Pool(num_processes... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/series/next_series_seasons.py | import re
from loguru import logger
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.manager import Session
from . import db
plugin_name = 'next_series_seasons'
logger = logger.bind(name=plugin_name)
MAX_SEASON_DIFF_WITHOUT_BEGIN = 15
MAX_SEASON_DIFF_WITH_BEGI... | PypiClean |
/Centaur-0.3.3.tar.gz/Centaur-0.3.3/centaur/datatypes/mixins.py | import re
class LengthValidationMixin(object):
msg_length = "{value} length is not {option_value}"
msg_length_min = "{value} length is not at least {option_value}"
msg_length_max = "{value} length is greater then {option_value}"
def validate_length(self, value, opt):
return len(value) == opt
... | PypiClean |
/advas-advanced-search-0.2.5.tar.gz/advas-0.2.5/stemmer.py |
# -----------------------------------------------------------
# AdvaS Advanced Search 0.2.5
# advanced search algorithms implemented as a python module
# module containing stemming algorithms
#
# (C) 2002 - 2014 Frank Hofmann, Berlin, Germany
# Released under GNU Public License (GPL)
# email fh@efho.de
# -------------... | PypiClean |
/Flask_BS4-5.3.1.0-py3-none-any.whl/flask_bs4/nav.py | from hashlib import sha1
from dominate import tags
from visitor import Visitor
class BootstrapRenderer(Visitor):
def __init__(self, html5=True, id=None):
self.html5 = html5
self._in_dropdown = False
self.id = id
def visit_Navbar(self, node):
# create a navbar id that is somew... | PypiClean |
/3dfin-0.2.0rc0-py3-none-any.whl/three_d_fin/gui/application.py | import sys
from pathlib import Path
from typing import Optional
import laspy
from pydantic import ValidationError
from pydantic.fields import ModelField
from PyQt5.QtCore import QEventLoop, QLocale, QObject, QThread, QUrl, pyqtSignal
from PyQt5.QtGui import (
QCloseEvent,
QDesktopServices,
QDoubleValidator... | PypiClean |
/NetFlowVizu-0.6.tar.gz/NetFlowVizu-0.6/net_flow_vizu_dia.py | import os
import types
import sys
import io
#########################################################################
#########################################################################
def err(txt):
sys.stderr.write(txt + "\n")
sys.exit(1)
##############################################################... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/lang/functional/binrec.js.uncompressed.js | define("dojox/lang/functional/binrec", ["dijit","dojo","dojox","dojo/require!dojox/lang/functional/lambda,dojox/lang/functional/util"], function(dijit,dojo,dojox){
dojo.provide("dojox.lang.functional.binrec");
dojo.require("dojox.lang.functional.lambda");
dojo.require("dojox.lang.functional.util");
// This module pro... | PypiClean |
/ExcelAlchemy-1.1.0.tar.gz/ExcelAlchemy-1.1.0/excelalchemy/types/field.py | import datetime
import logging
from functools import cached_property
from typing import AbstractSet
from typing import Any
from typing import Optional
from typing import Union
from pydantic import BaseModel
from pydantic.fields import FieldInfo
from pydantic.fields import Undefined as PydanticUndefined
from pydantic.t... | PypiClean |
/NREL-rex-0.2.84.tar.gz/NREL-rex-0.2.84/rex/multi_file_resource.py | import os
from glob import glob
import h5py
import numpy as np
from rex.renewable_resource import (NSRDB, SolarResource, GeothermalResource,
WindResource, WaveResource,
AbstractInterpolatedResource)
from rex.resource import Resource
from rex.utili... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/examples/benchmark_problems/scripts/generate_data_assim.py | import numpy as np
from scipy.integrate import solve_ivp
def write_data(fun, args, fname='data.txt', step=0.1, sd=0.1):
"""
Generate a dataset consisting of 10^n points arranged in a grid,
where n in the dimension of the function input.
These points are then propagated through time using scipy.solve_i... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/meshes/abstractMesh.py | from __future__ import division
from __future__ import unicode_literals
from builtins import object
from builtins import range
__docformat__ = 'restructuredtext'
__all__ = ["AbstractMesh"]
from future.utils import text_to_native_str
__all__ = [text_to_native_str(n) for n in __all__]
from fipy.tools import serialComm
... | PypiClean |
/Automancy-0.5.12.tar.gz/Automancy-0.5.12/automancy/decorators/deprecated.py | import functools
import inspect
import warnings
# TODO => Refactor as a class and clean up
# (This function is unmodified from the link below)
def deprecated(reason):
"""
This is a decorator which can be used to mark functions as deprecated.
It will result in a warning being emitted when the function is ... | PypiClean |
/MnemoPwd-1.2.1-py3-none-any.whl/mnemopwd/pyelliptic/hash.py |
# Copyright (c) 2014 Yann GUIBET <yannguibet@gmail.com>.
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | PypiClean |
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/utils/__init__.py | import sys
import importlib
import warnings
try:
import fast_matched_filter # noqa: F401
FMF_INSTALLED = True
except ImportError:
FMF_INSTALLED = False
__all__ = ['archive_read', 'catalog_to_dd', 'catalog_utils', 'clustering',
'correlate', 'despike', 'findpeaks', 'mag_calc', 'picker',
... | PypiClean |
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/generic_linux/sysfs_pwmout.py | import os
from time import sleep
from errno import EACCES
try:
from microcontroller.pin import pwmOuts
except ImportError:
raise RuntimeError("No PWM outputs defined for this board") from ImportError
# pylint: disable=unnecessary-pass
class PWMError(IOError):
"""Base class for PWM errors."""
pass
... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/plugins/input/json.py | from pathlib import Path
import dateutil.parser as parser
from loguru import logger
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.utils import json
logger = logger.bind(name='json')
class Json:
"""
Return entries from a json file.
::
fil... | PypiClean |
/Mopidy-3.4.1-py3-none-any.whl/mopidy/commands.py | from __future__ import annotations
import argparse
import collections
import contextlib
import logging
import os
import pathlib
import signal
import sys
from typing import TYPE_CHECKING
import pykka
from pykka.messages import ProxyCall
from mopidy import config as config_lib
from mopidy import exceptions
from mopidy... | PypiClean |
/NebulaPythonSDK-2.8.0.tar.gz/NebulaPythonSDK-2.8.0/README.md | # Nebula-Python-SDK
Travis CI unit tests & auto PyPi push status: [](https://travis-ci.org/nebula-orchestrator/nebula-python-sdk)
Code coverage: [
A simple library for simple JSON endpoints. YOLO!
Example
-------
#### GET
```python
from flask_yoloapi import endpoint, parameter
@app.route('/api/hello')
@endpoint.api(
parameter('name', type=str, required=True)
)
def api_hello(name):
return "Hel... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/codeintel2/lib_srcs/node.js/5.9/fs.js | var fs = {};
/**
* Asynchronous rename(2). No arguments other than a possible exception are
* given to the completion callback.
* @param oldPath
* @param newPath
* @param callback
*/
fs.rename = function(oldPath, newPath, callback) {}
/**
* Synchronous versions of [fs.write()][]. Returns the number of bytes
*... | PypiClean |
/GASSBI_distributions-0.1.tar.gz/GASSBI_distributions-0.1/distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
# TODO: make a Binomial class that inherits from the Distribution class. Use the specifications below.
class Binomial(Distribution):
def __init__(self, prob=0.5, size=2):
""" Binomial distribution class for calcul... | PypiClean |
/MQ2-1.1.0.tar.gz/MQ2-1.1.0/doc/install.rst | Install
=======
Dependencies
~~~~~~~~~~~~
MQ² requires `python 2 <http://www.python.org/download/>`_ (version 2.6 and
above) and is compatible with Python 3.
In addition to python MQ² has the following dependencies:
- `straight.plugin <https://pypi.python.org/pypi/straight.plugin/>`_
- `xlrd <https://pypi.python.o... | PypiClean |
/ConcordanceCrawler-1.0.2.tar.gz/ConcordanceCrawler-1.0.2/README.rst | ConcordanceCrawler
==================
|Build Status|
ConcordanceCrawler is a tool for automatic concordance extraction from
the Internet. A concordance is a sentence containing some given word.
Take an English word, and ConcordanceCrawler will be able to download
you hundreds thousands of sentences with your word.
C... | PypiClean |
/Chrysalio-1.0.tar.gz/Chrysalio-1.0/chrysalio/subscribers.py |
from os.path import splitext
from pyramid.events import BeforeRender
from pyramid.threadlocal import get_current_request
from pyramid.i18n import TranslationString
from .lib.utils import tostr, camel_case
from .lib.breadcrumbs import Breadcrumbs
from .lib.panel import Panel
from .includes.themes import theme_templat... | PypiClean |
/CBioNAMER-1.0.tar.gz/CBioNAMER-1.0/nner/model.py | import torch
from torch.nn import Module
from torch import nn
import math
class SinusoidalPositionEmbedding(Module):
"""定义Sin-Cos位置Embedding
"""
def __init__(
self, output_dim, merge_mode='add', custom_position_ids=False):
super(SinusoidalPositionEmbedding, self).__init__()
se... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.