id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/NREL_reV-0.8.1-py3-none-any.whl/reV/hybrids/hybrids.py | import logging
import numpy as np
import re
import pandas as pd
from string import ascii_letters
from warnings import warn
from collections import namedtuple
from reV.handlers.outputs import Outputs
from reV.utilities.exceptions import (FileInputError, InputError,
InputWarning, Ou... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/hris/model/multipart_form_field_request.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 |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/theme-tomorrow_night_eighties.js | ace.define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
exports.isDark = true;
exports.cssClass = "ace-tomorrow-night-eighties";
exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\
background: #272727;\
color: #CCC\
}\
.ace-tomorrow-n... | PypiClean |
/GeophPy-0.32.2.tar.gz/GeophPy-0.32.2/docs/_build/html/_static/js/theme.js | require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.expo... | PypiClean |
/FastFlask-1.2.32-py3-none-any.whl/werkzeug/datastructures.py | import base64
import codecs
import mimetypes
import re
import warnings
from collections.abc import Collection
from collections.abc import MutableSet
from copy import deepcopy
from io import BytesIO
from itertools import repeat
from os import fspath
from . import exceptions
from ._internal import _make_encode_wrapper
f... | PypiClean |
/Flask-Captcha-New-0.2.0.tar.gz/Flask-Captcha-New-0.2.0/flask_captcha/models.py | from flask_sqlalchemy import SQLAlchemy
from flask_captcha.helpers import get_challenge
from flask import current_app
import datetime
import random
import time
import unicodedata
import six
db = SQLAlchemy()
# Heavily based on session key generation in Django
# Use the system (hardware-based) random number generator ... | PypiClean |
/NEMO_CE-1.6.12-py3-none-any.whl/NEMO/static/datetimepicker/bootstrap-datetimepicker.js | The MIT License (MIT)
Copyright (c) 2015 Jonathan 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 without limitation the rights
to use, copy, modify,... | PypiClean |
/DiscoPlot-1.0.2.tar.gz/DiscoPlot-1.0.2/docs/_build/html/_static/doctools.js | * select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "... | PypiClean |
/dipex-4.54.5.tar.gz/dipex-4.54.5/exporters/utils/priority_by_class.py | from more_itertools import first
def choose_public_address_helper(
candidates, prioritized_classes, scope_getter, address_type_getter, uuid_getter
):
"""Pick the most desirable valid candidate address.
An address candidate is considered valid if its visibility is PUBLIC or UNSET.
An address candidat... | PypiClean |
/Humongolus-1.0.7.tar.gz/Humongolus-1.0.7/humongolus/widget.py | import copy
from humongolus import Widget, Field, Document, EmbeddedDocument, Lazy, List, DocumentException, EMPTY
def escape(s):
orig = copy.copy(s)
try:
s = unicode(s)
return s.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''')
exc... | PypiClean |
/Cibyl-1.0.0.0rc1.tar.gz/Cibyl-1.0.0.0rc1/docs/source/parser.rst | Parser
======
Cibyl provides two sources of user input, the configuration file and the command
line arguments. The configuration file details the ci environment that the user
wants to query, while the command line arguments tell Cibyl what the user wants
to query.
Cibyl's cli is divided in several subcommands. The pa... | PypiClean |
/OTLModel/Classes/Onderdeel/Buisbekleding.py | from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.ImplementatieElement.AIMObject import AIMObject
from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument
from OTLMOW.OTLModel.Datatypes.KlBekledingPlaats import KlBekledingPlaats
from OTLMOW.OTLModel.Datatypes.KlBuisbekl... | PypiClean |
/BlitzChain-0.8.2.tar.gz/BlitzChain-0.8.2/blitzchain/splitter.py | from typing import List, Dict
class WordSplitter:
def split_text_into_array(
self,
text: str,
max_word_count: int = 200,
overlap: int = 10,
chunksize: int = 20,
) -> List[str]:
"""Splits the input text into an array of strings with each element not exceeding the... | PypiClean |
/Absinthe-1.1.0.tar.gz/Absinthe-1.1.0/absinthe/tools/background_process_handler.py | import os
import time
import subprocess
from signal import SIGTERM
from utils import SimpleResponse
class BackgroundProcessHandler(object):
def __init__(self, command, pid_file, logger):
self.pid_file = pid_file
self.logger = logger
self.command = command
def start(self):
if s... | PypiClean |
/Flask-Runner-2.1.1.tar.gz/Flask-Runner-2.1.1/flask_runner.py | import sys
import os
import argparse
from flask.ext.script import Manager as BaseManager, Server as BaseServer, Shell, Command, Option
class Server(BaseServer):
def get_options(self):
options = super(Server, self).get_options()
options += (
Option('--noeval',
dest = 'use... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/drivers/legacy/ni/daqmx/tasks.py | import numpy as np
from lantz import Feat, Action
from lantz.foreign import RetStr, RetTuple, RetValue
from .base import Task, Channel
from .constants import Constants
_GROUP_BY = {'scan': Constants.Val_GroupByScanNumber,
'channel': Constants.Val_GroupByChannel}
class AnalogInputTask(Task):
"""An... | PypiClean |
/APScheduler-4.0.0a1.tar.gz/APScheduler-4.0.0a1/src/apscheduler/workers/sync.py | from __future__ import annotations
import atexit
import os
import platform
import threading
from concurrent.futures import Future, ThreadPoolExecutor
from contextlib import ExitStack
from contextvars import copy_context
from datetime import datetime, timezone
from logging import Logger, getLogger
from types import Tra... | PypiClean |
/ObjectListView2-1.0.0.tar.gz/ObjectListView2-1.0.0/README.txt | .. -*- coding: UTF-8 -*-
ObjectListView
==============
This is an upload of olv 1.3.2 from https://bitbucket.org/wbruhin/objectlistview/src/default/
*An ObjectListView is a wrapper around the wx.ListCtrl that makes the
list control easier to use. It also provides some useful extra functionality.*
Larry Wall, the a... | PypiClean |
/Flask-Obscurity-0.4.tar.gz/Flask-Obscurity-0.4/flask_obscurity/__init__.py |
import random
import os
import re
from flask import Blueprint, current_app, url_for
from jinja2 import Markup, escape
from six import b, iterbytes, indexbytes
class Obscurity(object):
def __init__(self, app=None):
if app is not None:
self.init_app(app)
def init_app(self, app):
s... | PypiClean |
/Flask-Monitoring-1.1.2.tar.gz/Flask-Monitoring-1.1.2/flask_monitoringdashboard/views/version.py | from flask import jsonify, request, json
from flask_monitoringdashboard.controllers.versions import (
get_multi_version_data,
get_version_user_data,
get_version_ip_data,
)
from flask_monitoringdashboard.database import session_scope
from flask_monitoringdashboard.core.auth import secure
from flask_monito... | PypiClean |
/Flask_Admin-1.6.1-py3-none-any.whl/flask_admin/contrib/mongoengine/fields.py | from mongoengine.base import get_document
from werkzeug.datastructures import FileStorage
from wtforms import fields
try:
from wtforms.fields.core import _unset_value as unset_value
except ImportError:
from wtforms.utils import unset_value
from . import widgets
from flask_admin.model.fields import InlineFor... | PypiClean |
/DEODR-0.2.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl/deodr/mesh_fitter.py |
import copy
from typing import Any, Dict, List, Optional, Tuple
import numpy as np
import scipy.sparse.linalg
import scipy.spatial.transform.rotation
from . import Camera, ColoredTriMesh, LaplacianRigidEnergy, Scene3D
from .tools import (
check_jacobian_finite_differences,
normalize,
normalize_backward,
... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/contrib/sitemaps/__init__.py | import warnings
from urllib.parse import urlencode
from urllib.request import urlopen
from django.apps import apps as django_apps
from django.conf import settings
from django.core import paginator
from django.core.exceptions import ImproperlyConfigured
from django.urls import NoReverseMatch, reverse
from django.utils ... | PypiClean |
/Biosaur-2.0.3.tar.gz/Biosaur-2.0.3/biosaur_src/funcs.py | from . import classes
import numpy as np
from scipy.stats import binom
from scipy.stats import scoreatpercentile
from scipy.optimize import curve_fit
import operator
import math
from multiprocessing import Queue, Process, cpu_count
import logging
import itertools
from copy import deepcopy
from collections import defaul... | PypiClean |
/Django-Bootstrap3-Validator-0.3.3.zip/Django-Bootstrap3-Validator-0.3.3/bootstrap_validator/static/validator/js/language/pl_PL.js | (function($) {
/**
* Polish language package
* Translated by @grzesiek
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Wpisz poprawny ciąg znaków zakodowany w base 64'
},
between: {
'default': '... | PypiClean |
/DynaMIT-1.1.5.tar.gz/DynaMIT-1.1.5/dynamit/graphProtSearcher.py |
from __future__ import print_function
from __future__ import division
from builtins import str
import os, shutil, subprocess, itertools
from subprocess import CalledProcessError
import dynamit.motifSearcher
import dynamit.utils
class GraphProtSearcher(dynamit.motifSearcher.MotifSearcher):
"""Class implementing a ... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/weights/mass_properties_of_shapes.py | import aerosandbox.numpy as np
from aerosandbox.weights.mass_properties import MassProperties
"""
Most of these relations are taken from:
https://en.wikipedia.org/wiki/List_of_moments_of_inertia
"""
def mass_properties_from_radius_of_gyration(
mass: float,
x_cg: float = 0,
y_cg: float = 0,
... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/globals.d.ts | interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepar... | PypiClean |
/ANNOgesic-1.1.14.linux-x86_64.tar.gz/usr/local/lib/python3.10/dist-packages/annogesiclib/circrna.py | import os
import sys
import time
import shutil
import copy
from glob import glob
from subprocess import call, Popen
from annogesiclib.multiparser import Multiparser
from annogesiclib.helper import Helper
from annogesiclib.converter import Converter
from annogesiclib.circRNA_detection import detect_circrna
class CircR... | PypiClean |
/Lokai-0.3.tar.gz/Lokai-0.3/lokai/lk_worker/nodes/search.py |
#-----------------------------------------------------------------------
from types import StringTypes
from collections import deque
from sqlalchemy import and_, not_, or_, exists
from sqlalchemy.orm import aliased
from lokai.tool_box.tb_database.orm_interface import engine
from lokai.lk_worker.models import ndNod... | PypiClean |
/FileCrawler-0.1.8.tar.gz/FileCrawler-0.1.8/filecrawler/rules/aws.py | import re
from filecrawler.rulebase import RuleBase
class AWS(RuleBase):
def __init__(self):
super().__init__('aws-access-token', 'AWS')
self._regex = re.compile(r"(?<![A-Z0-9])(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}")
self._keywords = ["AKIA",
... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/variables/addOverFacesVariable.py | from __future__ import division
from __future__ import unicode_literals
__all__ = []
from fipy.tools import numerix
from fipy.tools import inline
from fipy.variables.cellVariable import CellVariable
class _AddOverFacesVariable(CellVariable):
r"""surface integral of `self.faceVariable`, :math:`\phi_f`
.. math... | PypiClean |
/CODCQC-1.0.tar.gz/CODCQC-1.0/README.md | # CODCQC
An open source Python interface to the quality control of ocean in-situ observations.
CODC-QC is an open source Python interface to the quality control of ocean *in-situ* observations (e.g, temperature profiles, salinity profiles etc.). It was developed to reduce human-workload and time-consuming on manual qu... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/glob2/glob2/impl.py |
from __future__ import absolute_import
import sys
import os
import re
from os.path import join
from . import fnmatch
try:
from itertools import imap
except ImportError:
imap = map
class Globber(object):
listdir = staticmethod(os.listdir)
isdir = staticmethod(os.path.isdir)
islink = staticmetho... | PypiClean |
/Altair%20Smartworks%20SDK-0.0.1.tar.gz/Altair Smartworks SDK-0.0.1/openapi_client/model/action_reboot_response.py | import re # noqa: F401
import sys # noqa: F401
from openapi_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
... | PypiClean |
/BlazeWeb-0.6.2-py3-none-any.whl/blazeweb/middleware.py | import logging
from os import path
from io import StringIO
from tempfile import TemporaryFile
import time
from beaker.middleware import SessionMiddleware
from blazeutils import randchars, pformat, tolist
from paste.registry import RegistryManager
from werkzeug.datastructures import EnvironHeaders
from werkzeug.debug i... | PypiClean |
/ImSwitch-2.0.0.tar.gz/ImSwitch-2.0.0/imswitch/imcontrol/model/managers/rs232/GRBLManager.py | from imswitch.imcommon.model import initLogger
import imswitch.imcontrol.model.interfaces.grbldriver as grbldriver
class GRBLManager:
""" A general-purpose RS232 manager that together with a general-purpose
RS232Driver interface can handle an arbitrary RS232 communication channel,
with all the standard se... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/Rules/RulesChecker.py |
import copy
import warnings
from grid2op.Exceptions import Grid2OpException
from grid2op.Rules.BaseRules import BaseRules
from grid2op.Rules.AlwaysLegal import AlwaysLegal
class RulesChecker(object):
"""
Class that define the rules of the game.
"""
def __init__(self, legalActClass=AlwaysLegal):
... | PypiClean |
/HolmesV-2021.10.8.tar.gz/HolmesV-2021.10.8/mycroft/audio/services/simple/__init__.py | import signal
from threading import Lock
from time import sleep
from mycroft.audio.services import AudioBackend
from mycroft.messagebus.message import Message
from mycroft.util.log import LOG
from mycroft.util import play_mp3, play_ogg, play_wav
import mimetypes
import re
from requests import Session
def find_mime(p... | PypiClean |
/Notable-0.4.2.tar.gz/Notable-0.4.2/notable/static/lib/ace/src-min/mode-diff.js | define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./diff_highlight_rules").DiffHighlightRules,u=e("./folding/diff").FoldMo... | PypiClean |
/MLBPlayerIDs-0.1.0.tar.gz/MLBPlayerIDs-0.1.0/mlbids/_sfbb.py | import collections
import typing
import bs4
import requests
HEADERS = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
}
def get_soup(url: str) -> bs4.BeautifulSoup:
"""
:param url: The URL of the webpage to scrape
:return: A `BeautifulSoup` object for the passed URL
"""
res = re... | PypiClean |
/DJQ_Distributions-1.0.tar.gz/DJQ_Distributions-1.0/DJQ_Distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/GenMotion-0.0.4-py3-none-any.whl/genmotion/algorithm/action_conditioned/utils/rotation_conversions.py |
import functools
from typing import Optional
import torch
import torch.nn.functional as F
"""
The transformation matrices returned from the functions in this file assume
the points on which the transformation will be applied are column vectors.
i.e. the R matrix is structured as
R = [
[Rxx, Rxy, Rx... | PypiClean |
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/py/magic.py | __author__ = "David N. Mashburn <david.n.mashburn@gmail.com>"
# created 07/01/2009
import keyword
from .parse import testForContinuations
aliasDict = {}
#DNM
# TODO : Still Refining this... seems to be ok for now... still finding gotchas, though!
# TODO : Multi-line strings seem to be correctly broken into commands... | PypiClean |
/Apilisk-0.2.1.tar.gz/Apilisk-0.2.1/apilisk/runner.py | import json
import copy
import pytz
import sys
from datetime import datetime
from apilisk.curl_caller import CurlCaller
from apilisk.printer import vprint, Colors
from apilisk.exceptions import ObjectNotFound, ApiliskException
from apiwatcher_pyclient.client import Client
class Runner(object):
def __init__(sel... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dijit/nls/dijit-all_hu.js | dojo.provide("dijit.nls.dijit-all_hu");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.hu");dojo.nls.colors.hu={"lightsteelblue":"világos acélkék","orangered":"narancsvörös","midnightblue":"éjkék","cadetblue":"kadétkék","seashell":"kagyló","slategrey":"palaszürke","coral":"kora... | PypiClean |
/Nescient-0.9.0-cp36-cp36m-win_amd64.whl/nescient/resources/banner.py | BANNER_DATA = '''R0lGODlhBAJEAOf/AAABAAACAAIAGQEEAAMBIgIFAQQHAwAGKAALBAENBwAKLgIOCAQKLwQMLAAONgATDAQPKAAROAIVDwASPwAZEgEUQQEaEwIVQgIaFAAX
QgAcFQAdFwUXRAYXRQQeEwEfGAUfFAAhFQAhGQAhGgEiFgAiGgIjFwMkGAQlGQUhQwQmGgUnGwApGwApHAYoHAAqHQArHgAsHwAtHwEuIAIuIQArSwMvIgQw
IwQxIwUyJAA0JQYzJQA1JgA1JwA2JwA3KAA4KQA5KgE6KwI7LAM8LAA+KQQ9L... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/view/widgets/AlignmentLineWidget.py | from qtpy import QtCore, QtWidgets
from imswitch.imcommon.view.guitools import naparitools
from imswitch.imcontrol.view import guitools
from .basewidgets import Widget
class AlignmentLineWidget(Widget):
""" Alignment widget that displays a line on top of the image in the viewbox."""
sigAlignmentLineMakeClic... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/charting/action2d/Tooltip.js | if(!dojo._hasResource["dojox.charting.action2d.Tooltip"]){
dojo._hasResource["dojox.charting.action2d.Tooltip"]=true;
dojo.provide("dojox.charting.action2d.Tooltip");
dojo.require("dojox.charting.action2d.Base");
dojo.require("dijit.Tooltip");
dojo.require("dojox.lang.functional");
dojo.require("dojox.lang.functional.s... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/utils/aria-utils.js | 'use strict';
exports.__esModule = true;
var aria = aria || {};
aria.Utils = aria.Utils || {};
/**
* @desc Set focus on descendant nodes until the first focusable element is
* found.
* @param element
* DOM node for which to find the first focusable descendant.
* @returns
* true if a focusable e... | PypiClean |
/EQcorrscan-0.4.4.tar.gz/EQcorrscan-0.4.4/eqcorrscan/tutorials/template_creation.py | import logging
from obspy.clients.fdsn import Client
from obspy.core.event import Catalog
from eqcorrscan.utils.catalog_utils import filter_picks
from eqcorrscan.core import template_gen
# Set up logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s")
de... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/colorama/ansi.py | CSI = '\033['
OSC = '\033]'
BEL = '\007'
def code_to_chars(code):
return CSI + str(code) + 'm'
def set_title(title):
return OSC + '2;' + title + BEL
def clear_screen(mode=2):
return CSI + str(mode) + 'J'
def clear_line(mode=2):
return CSI + str(mode) + 'K'
class AnsiCodes(object):
def __init_... | PypiClean |
/Idmeneo_cdQa-0.0.tar.gz/Idmeneo_cdQa-0.0/retriever/vectorizers.py | import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from .text_transformers import BM25Transformer
class BM25Vectorizer(CountVectorizer):
"""Convert a collection of raw documents to a matrix of BM25 features and computes
scores of the documents based on a query
Vectorizer inspi... | PypiClean |
/Finance-Hermes-0.3.6.tar.gz/Finance-Hermes-0.3.6/hermes/factors/technical/core/overlap.py | import numpy as np
import pandas as pd
from hermes.factors.technical.core.utilities import *
def dema(close, length=None, offset=None, **kwargs):
length = int(length) if length and length > 0 else 10
offset = int(offset) if isinstance(offset, int) else 0
ema1 = ema(close=close, length=length)
ema2 = e... | PypiClean |
/NucleoATAC-0.3.4.tar.gz/NucleoATAC-0.3.4/pyatac/get_cov.py | import os
import multiprocessing as mp
import itertools
import numpy as np
import pysam
import traceback
import pyximport; pyximport.install()
from pyatac.tracks import CoverageTrack
from pyatac.chunk import ChunkList
from pyatac.utils import shell_command, read_chrom_sizes_from_bam
from pyatac.chunkmat2d import Fragme... | PypiClean |
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/vendor/sockjs/tornado/session.py | from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.session
~~~~~~~~~~~~~~~~~~~~~~
SockJS session implementation.
"""
import asyncio
import functools
import logging
from octoprint.vendor.sockjs.tornado import periodic, proto, sessioncontainer
from octopr... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/loaders/mdv.py | import pairlist as pl
import numpy as np
import re
import logging
desc = {"ref": {},
"brief": "MDView file (in Angdtrom).",
"usage": "No options available."
}
if __name__[-4:] == 'mdva':
desc["brief"] = "MDView file (in au)."
def load_iter(file, oname, hname=None):
logger = logging.ge... | PypiClean |
/DataTig-0.5.0.tar.gz/DataTig-0.5.0/datatig/cli.py | import argparse
import datatig.process
def main() -> None:
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest="subparser_name")
build_parser = subparsers.add_parser("build")
build_parser.add_argument("source")
build_parser.add_argument(
"--staticsiteoutput", help... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wps/parameters/data_types.py |
from datetime import datetime, date, time, timedelta
from django.utils.dateparse import parse_date, parse_datetime, parse_time, utc
from django.utils.six import PY2, PY3, string_types
from django.utils.encoding import smart_str
from eoxserver.core.util.timetools import parse_duration
try:
from datetime import tim... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/labelme/shape.py | import copy
import math
from qtpy import QtCore
from qtpy import QtGui
import labelme.utils
# TODO(unknown):
# - [opt] Store paths instead of creating new ones at each paint.
DEFAULT_LINE_COLOR = QtGui.QColor(0, 255, 0, 128) # bf hovering
DEFAULT_FILL_COLOR = QtGui.QColor(0, 255, 0, 128) # hovering
DEFAULT_SELE... | PypiClean |
/FJUtils-0.0.16-py3-none-any.whl/fjutils/optimizers.py | import optax
from typing import Optional, NamedTuple, Any
import chex
from jax import numpy as jnp
import jax
class OptaxScheduledWeightDecayState(NamedTuple):
count: jax.Array
def optax_add_scheduled_weight_decay(schedule_fn, mask=None):
"""
:param schedule_fn:
:param mask:
:return: Optax Grad... | PypiClean |
/LitleSdkPython3-9.3.1b0.tar.gz/LitleSdkPython3-9.3.1b0/litleSdkPythonTestv2/functional/TestBatch.py |
import os, sys
lib_path = os.path.abspath('../all')
sys.path.append(lib_path)
from SetupTest import *
import unittest
import tempfile
import shutil
import copy
class TestBatch(unittest.TestCase):
def setUp(self):
self.merchantId = '0180'
def testSendToLitleSFTP_WithPreviouslyCreatedFile(self):
... | PypiClean |
/CADET-Process-0.7.3.tar.gz/CADET-Process-0.7.3/CADETProcess/simulator/cadetAdapter.py | from collections import defaultdict
import os
import platform
from pathlib import Path
import shutil
import subprocess
from subprocess import TimeoutExpired
import time
import tempfile
from addict import Dict
import numpy as np
from cadet import Cadet as CadetAPI
from CADETProcess import CADETProcessError
from CADETP... | PypiClean |
/Flask-Scaffold-0.5.1.tar.gz/Flask-Scaffold-0.5.1/app/templates/static/node_modules/angular-grid/src/ts/toolPanel/groupSelectionPanel.ts |
module awk.grid {
var _ = Utils;
var svgFactory = SvgFactory.getInstance();
export class GroupSelectionPanel {
gridOptionsWrapper: any;
columnController: ColumnController;
inMemoryRowController: any;
cColumnList: any;
layout: any;
constructor(columnContro... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/sitemaps/views.py | import warnings
from django.contrib.sites.models import get_current_site
from django.core import urlresolvers
from django.core.paginator import EmptyPage, PageNotAnInteger
from django.http import Http404
from django.template.response import TemplateResponse
from django.utils import six
def index(request, sitemaps,
... | PypiClean |
/Agora-Planner-0.3.9.tar.gz/Agora-Planner-0.3.9/agora/planner/plan/agp.py | import logging
import re
from collections import namedtuple
from urlparse import urlparse
import networkx as nx
from rdflib import ConjunctiveGraph, URIRef, BNode, RDF, Literal
__author__ = 'Fernando Serena'
log = logging.getLogger('agora.planner.plan')
def extend_uri(uri, prefixes):
if ':' in uri:
pre... | PypiClean |
/Automated_cartography-0.0.2-py3-none-any.whl/robot/shortshow.py | '''测试程序'''
import get_ip
'''测试图像显示,以及动作组调用'''
import cv2
import time
import LSC_Client
import threading
ip = get_ip.postaddress()
stream = "http://"+ip+":8080/?action=stream?dummy=param.mjpg"
cap = cv2.VideoCapture(stream)
lsc = LSC_Client.LSC_Client()
def Move():
lsc.MoveServo(6, 1500, 1000)
lsc.MoveServo(7... | PypiClean |
/OSF_EIMTC-0.1.46.tar.gz/OSF_EIMTC-0.1.46/src/EIMTC/models/_hybrid.py | from tensorflow.keras.models import Model
from tensorflow.keras.layers import Input, Layer, BatchNormalization, MaxPool1D, Conv1D, ReLU, MaxPooling1D, Flatten, Bidirectional, GRU, LeakyReLU, Lambda, Dense, MaxPool2D, Conv2D, LSTM, Concatenate, Dropout
from tensorflow.keras.constraints import max_norm
from tensorflow i... | PypiClean |
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/crm/model/crm_contact_endpoint_request.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 |
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/threads/moderation/posts.py | from django.db import transaction
from django.utils import timezone
from django.utils.translation import gettext as _
from .exceptions import ModerationError
__all__ = [
"approve_post",
"protect_post",
"unprotect_post",
"unhide_post",
"hide_post",
"delete_post",
]
def approve_post(user, post... | PypiClean |
/Corrfunc-2.5.1.tar.gz/Corrfunc-2.5.1/docs/source/modules/which_corrfunc.rst | .. _which_corrfunc:
***********************************
Which correlation function to use?
***********************************
Corrfunc has a variety of correlation functions to cover a broad range of Science applications. The basic distinction occurs if the input particles are directly
from a simulation or from an o... | PypiClean |
/DeepCellTL-0.12.5.tar.gz/DeepCellTL-0.12.5/deepcell/model_zoo/tracking.py | """Assortment of CNN (and GNN) architectures for tracking single cells"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import ast
import math
import numpy as np
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras imp... | PypiClean |
/Aquila_Resolve-0.1.4-py3-none-any.whl/Aquila_Resolve/models/dp/preprocessing/text.py | from typing import List, Iterable, Dict, Tuple, Any
class LanguageTokenizer:
"""Simple tokenizer for language to index mapping."""
def __init__(self, languages: List[str]) -> None:
"""
Initializes a language tokenizer for a list of languages.
Args:
languages (List[str]): L... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/strategies/axelrod_second.py | from typing import List
import numpy as np
from axelrod.action import Action
from axelrod.interaction_utils import compute_final_score
from axelrod.player import Player
from axelrod.strategies.finite_state_machines import FSMPlayer
C, D = Action.C, Action.D
class SecondByChampion(Player):
"""
Strategy submi... | PypiClean |
/Biosaur-2.0.3.tar.gz/Biosaur-2.0.3/biosaur_src/classes.py | from copy import copy
from collections import defaultdict
import numpy as np
from scipy.signal import medfilt
import math
import itertools
def meanfilt(data, window_width):
cumsum_vec = np.cumsum(np.insert(data, 0, 0))
ma_vec = (cumsum_vec[window_width:] -
cumsum_vec[:-window_width]) / window_wi... | PypiClean |
/Cuttlefish-0.3.tar.gz/Cuttlefish-0.3/cuttlefish/__init__.py | from bottle import redirect, request, route, send_file
from mako.exceptions import TopLevelLookupException
from mako.lookup import TemplateCollection
from mako.template import Template
import os.path
import subprocess
__version__ = '0.3'
__license__ = 'MIT'
class Config:
"""
Cuttlefish config from plist file.... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/segmentation/fully_convolutional.py |
__author__ = "Christian Heider Nielsen"
__doc__ = r"""
Created on 18/07/2020
"""
import math
import torch
from torch import nn
from torch.optim import Adam
from neodroidvision.segmentation import dice_loss
__all__ = ["FullyConvolutional", "FCN"]
class FullyConvolutional(nn.Module):
"""... | PypiClean |
/Cuckoo-2.0.7a1.tar.gz/Cuckoo-2.0.7a1/cuckoo/web/static/js/cuckoo/analysis_sidebar.js | 'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/channel_create.py |
from msrest.serialization import Model
class ChannelCreate(Model):
"""ChannelCreate.
All required parameters must be populated in order to send to Azure.
:param interval_minutes: Required. The interval of the channel in minutes
15 = FifteenMinute,
30 = ThirtyMinute,
60 = Hourly,
144... | PypiClean |
/LabtoolSuite-0.1.3.tar.gz/LabtoolSuite-0.1.3/Labtools/experiment.py | import os
os.environ['QT_API'] = 'pyqt'
import sip
sip.setapi("QString", 2)
sip.setapi("QVariant", 2)
# Import the core and GUI elements of Qt
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import PyQt4.QtGui as Widgets
# Import the console machinery from ipython
from IPython.qt.console.rich_ipython_widget impo... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/localization/pl/MathMenu.js | MathJax.Localization.addTranslation("pl","MathMenu",{version:"2.7.9",isLoaded:true,strings:{Show:"Poka\u017C wzory jako",MathMLcode:"Kod MathML",OriginalMathML:"Oryginalny MathML",TeXCommands:"Polecenia TeX",AsciiMathInput:"Wej\u015Bcie AsciiMathML",Original:"Oryginalny formularz",ErrorMessage:"Komunikat o b\u0142\u011... | PypiClean |
/EVE-SRP-0.12.11.tar.gz/EVE-SRP-0.12.11/src/evesrp/migrate/versions/4280bf2417c_.py | revision = '4280bf2417c'
down_revision = '2976d59f286'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import update, select, table, column, or_
import evesrp.transformers
division = table('division',
column('id', sa.Integer),
column('ship_transformer', sa.PickleType),
colu... | PypiClean |
/NEURON-9.0a0-cp311-cp311-macosx_10_15_x86_64.whl/neuron/neuroml/morphml.py | from .xml2nrn import *
def cable(self, node):
self.lastcabid_ = -1
if self.in_cablegroup_:
self.cablegroups_[-1].cable_indices_.append(
self.cableid2index_[int(node.get("id"))]
)
else:
cab = self.cables_[self.cableid2index_[int(node.get("id"))]]
self.lastcabid_ ... | PypiClean |
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/pym/bob/cmds/build/status.py |
from ...builder import LocalBuilder, checkoutsFromState
from ...input import RecipeSet
from ...scm import getScm, ScmTaint, ScmStatus
from ...state import BobState
from ...tty import colorize, ERROR, WARNING, EXECUTED, DEFAULT, SKIPPED, \
IMPORTANT, NORMAL, INFO, DEBUG, TRACE, HEADLINE
from ...utils import joinLin... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/vote2.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 vote2(path):
"""vote2
Data loads lazily. Type data(vote2) into the console.
A data.fram... | PypiClean |
/MatchZoo-2.2.0.tar.gz/MatchZoo-2.2.0/matchzoo/datasets/snli/load_data.py |
import typing
from pathlib import Path
import pandas as pd
import keras
import matchzoo
_url = "https://nlp.stanford.edu/projects/snli/snli_1.0.zip"
def load_data(
stage: str = 'train',
task: str = 'classification',
target_label: str = 'entailment',
return_classes: bool = False
) -> typing.Union[m... | PypiClean |
/Flask_Admin-1.6.1-py3-none-any.whl/flask_admin/model/fields.py | import itertools
from wtforms.validators import ValidationError
from wtforms.fields import FieldList, FormField, SelectFieldBase
try:
from wtforms.fields import _unset_value as unset_value
except ImportError:
from wtforms.utils import unset_value
from flask_admin._compat import iteritems
from .widgets import... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/atari/config/serial/spaceinvaders/spaceinvaders_onppo_config.py | from copy import deepcopy
from easydict import EasyDict
spaceinvaders_ppo_config = dict(
exp_name='spaceinvaders_onppo_seed0',
env=dict(
collector_env_num=16,
evaluator_env_num=8,
n_evaluator_episode=8,
stop_value=int(1e10),
env_id='SpaceInvadersNoFrameskip-v4',
... | PypiClean |
/MAGPlus-0.2.2.tar.gz/MAGPlus-0.2.2/magplus/magplus.py |
DEBUG = False
import urllib2
import re
from datetime import datetime
from xml.dom.minidom import parseString
from operator import itemgetter
import urlparse
import bs4
class MinecraftAssetsGetter:
# last backslash in fileUrl is important
def __init__(self, xmlUrl='http://assets.minecraft.net/', fileUrl='ht... | PypiClean |
/ConfigHandler-python-2.0.2.tar.gz/ConfigHandler-python-2.0.2/config_handler/_ui.py | import os
import shutil
import textwrap
from typing import Dict
from typing import Union
from config_handler import info
def clearScreen() -> None:
os.system("cls" if os.name == "nt" else "clear")
def confirm(message: str = "Press enter to continue...") -> None:
input(message)
class InputBox:
"""
... | PypiClean |
/HTTP-PyServer-0.1.4.3.2.tar.gz/HTTP-PyServer-0.1.4.3.2/README.md | # Project Description
HTTP-PyServer is a simple, and extremely light-weight solution to create powerful projects relying on the web with the fewest lines of code. It uses python built-in packages to host server's and then handle http requests, as well as responses. It's extremely customizable, and allows you do to alm... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/provider/voiceprovider/custom_voice_provider.py | import logging
import requests
from linotp.provider import provider_registry
from linotp.provider.provider_base import ProviderBase
from linotp.provider.voiceprovider import TwillioMixin
#
# set the default connection and request timeouts
#
DEFAULT_TIMEOUT = (3, 5)
log = logging.getLogger(__name__)
@provider_regis... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dijit/form/_FormWidget.js | if(!dojo._hasResource["dijit.form._FormWidget"]){
dojo._hasResource["dijit.form._FormWidget"]=true;
dojo.provide("dijit.form._FormWidget");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/worker/replay_buffer/utils.py | from typing import Any
import time
from queue import Queue
from typing import Union, Tuple
from threading import Thread
from functools import partial
from ding.utils.autolog import LoggedValue, LoggedModel
from ding.utils import LockContext, LockContextType, remove_file
def generate_id(name, data_id: int) -> str:
... | PypiClean |
/Mesa_Adapted-0.8.7.3-py3-none-any.whl/mesa/visualization/ModularVisualization.py | import os
import tornado.autoreload
import tornado.ioloop
import tornado.web
import tornado.websocket
import tornado.escape
import tornado.gen
import webbrowser
from mesa.visualization.UserParam import UserSettableParameter
# Suppress several pylint warnings for this file.
# Attributes being defined outside of init i... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/themes/default/theme.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.themes.add('default',(function(){function a(b,c){var d,e;e=b.config.sharedSpaces;e=e&&e[c];e=e&&CKEDITOR.document.getById(e);if(e){var f='<span class="cke_shared"><... | PypiClean |
/Lib_HaL9k-0.7.0-py3-none-any.whl/hal9k/track.py |
import virtualbox
from virtualbox.library import LockType, VBoxErrorInvalidObjectState
class TrackException(Exception):
"""Custom exception for the track class."""
class Track:
"""The Track Class."""
def __init__(self, track_name, vbox):
"""Initialize the Track class."""
self.__vbox = ... | PypiClean |
/Houndify-2.1.0.tar.gz/Houndify-2.1.0/houndify/sample_wave.py | import houndify
import argparse
import sys
import time
import wave
import json
BUFFER_SIZE = 256
#
# Simplest HoundListener; just print out what we receive.
# You can use these callbacks to interact with your UI.
#
class MyListener(houndify.HoundListener):
def __init__(self):
pass
def onPartialTranscr... | PypiClean |
/MirrorHerokuX-6.0.3-py3-none-any.whl/bot/helper/mirror_utils/download_utils/aria2_download.py | from bot import aria2, download_dict_lock, STOP_DUPLICATE_MIRROR
from bot.helper.mirror_utils.upload_utils.gdriveTools import GoogleDriveHelper
from bot.helper.ext_utils.bot_utils import *
from .download_helper import DownloadHelper
from bot.helper.mirror_utils.status_utils.aria_download_status import AriaDownloadStatu... | PypiClean |
/BenchExec-3.17.tar.gz/BenchExec-3.17/benchexec/tools/esbmc.py |
import os
from benchexec.tools.sv_benchmarks_util import get_data_model_from_task, ILP32, LP64
import benchexec.tools.template
import benchexec.result as result
class Tool(benchexec.tools.template.BaseTool2):
"""
This class serves as tool adaptor for ESBMC (http://www.esbmc.org/)
"""
def executable(... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.