id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/lang/da.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.lang['da']={"editor":"Rich Text Editor","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Tryk ALT 0 for hjælp","browseServer":"Gennemse...","url":"URL",...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/__init__.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from observations.r.abbey import abbey from observations.r.ability import ability from observations.r.absentee import absentee from observations.r.accdeaths import accdeaths from observations.r.accident import ...
PypiClean
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/strategy_transformers.py
import inspect from importlib import import_module from typing import Any from axelrod.strategies.sequence_player import SequencePlayer from .action import Action from .makes_use_of import makes_use_of_variant from .player import Player C, D = Action.C, Action.D # Note: After a transformation is applied, the player...
PypiClean
/DendroPy-4.6.1.tar.gz/DendroPy-4.6.1/src/dendropy/model/parsimony.py
############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this work or any portion there...
PypiClean
/Distutils2-1.0a4.tar.gz/Distutils2-1.0a4/distutils2/_backport/sysconfig.py
import os import re import sys from os.path import pardir, realpath from ConfigParser import RawConfigParser __all__ = [ 'get_config_h_filename', 'get_config_var', 'get_config_vars', 'get_makefile_filename', 'get_path', 'get_path_names', 'get_paths', 'get_platform', 'get_python_ver...
PypiClean
/Nevow-0.14.5.tar.gz/Nevow-0.14.5/nevow/useragent.py
# Internet Explorer 1.0 # Microsoft Internet Explorer/Version (Platform) # Internet Explorer, and browsers cloaking as Internet Explorer # Mozilla/MozVer (compatible; MSIE IEVer[; Provider]; Platform[; Extension]*) [Addition] # MozVer # Netscape < 6.0 # Mozilla/Version[Gold] [[Language]][Provider] (Platform; Security...
PypiClean
/energon_prometheus_exporter_test-0.0.1-py3-none-any.whl/sc2bench/models/layer.py
import torch from compressai.entropy_models import GaussianConditional from compressai.layers import GDN1 from compressai.models import CompressionModel from compressai.models.google import get_scale_table from compressai.models.utils import update_registered_buffers from torch import nn from torchdistill.common.consta...
PypiClean
/3a_python_package_ligia-0.1.tar.gz/3a_python_package_ligia-0.1/distributions/Gaussiandistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing ...
PypiClean
/MDSuite-0.2.0-py3-none-any.whl/mdsuite/experiment/run.py
from __future__ import annotations import functools from typing import TYPE_CHECKING, Any, List, Type, Union from mdsuite.calculators import ( AngularDistributionFunction, # SpatialDistributionFunction, ) from mdsuite.calculators import ( # StructureFactor, CoordinationNumbers, EinsteinDiffusionCoeffici...
PypiClean
/KojiChannelValidator-0.1.1-py3-none-any.whl/kojichannelvalidator/koji_channel_validator.py
import os import requests import koji import re import logging class Channel: """ Koji build channel """ def __init__(self, name, id, cpus=8): self.name = str(name) self.id = int(id) self.host_list = [] self.config_groups = [] self.min_cpus = cpus def __st...
PypiClean
/NLP_LIB-0.0.12.tar.gz/NLP_LIB-0.0.12/NLP_LIB/nlp_core/data_transform_wrapper.py
class DataTransformWrapper: # When initialize DataTransformWrapper, we pass configuration and dataset object to constructor def __init__(self, config, dataset): self.config = config self.dataset = dataset # Function used for encode batch of string data into batch of encoded integer def encode(self, to...
PypiClean
/APIFlask-2.0.1-py3-none-any.whl/apiflask/ui_templates.py
redoc_template = """ <!DOCTYPE html> <html> <head> <title>{{ title }} {{ version }} - Redoc</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> {% if config.REDOC_USE_GOOGLE_FONT %} <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Ro...
PypiClean
/MIAvisual-0.0.6-py3-none-any.whl/matplotlib/_cm.py
from functools import partial import numpy as np _binary_data = { 'red': ((0., 1., 1.), (1., 0., 0.)), 'green': ((0., 1., 1.), (1., 0., 0.)), 'blue': ((0., 1., 1.), (1., 0., 0.)) } _autumn_data = {'red': ((0., 1.0, 1.0), (1.0, 1.0, 1.0)), 'green': ((0., 0., 0.), (1.0, 1.0, 1.0...
PypiClean
/Fabric39-1.15.3.post1.tar.gz/Fabric39-1.15.3.post1/fabric/decorators.py
import six import types from functools import wraps try: from Crypto import Random except ImportError: Random = None from fabric import tasks from .context_managers import settings def task(*args, **kwargs): """ Decorator declaring the wrapped function to be a new-style task. May be invoked as ...
PypiClean
/CONEstrip-0.1.1.tar.gz/CONEstrip-0.1.1/src/conestrip/polyhedron.py
import cdd from conestrip.utility import print_list class InEquality(object): def __init__(self, v): self.v = v def __str__(self): # prints a * x[i] def term(a, i): if a == 0: return '' if a == 1: return f'x{i}' if a...
PypiClean
/BootstrapPy-0.6.tar.gz/BootstrapPy-0.6/bootstrappy/templates/+package+/static/js/i18n/grid.locale-nl.js
(function(a) { a.jgrid = a.jgrid || {}; a.extend(a.jgrid,{ defaults: { recordtext: "regels {0} - {1} van {2}", emptyrecords: "Geen data gevonden.", loadtext: "laden...", pgtext: "pagina {0} van {1}" }, search: { captio...
PypiClean
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap/site/content/docs/5.0/utilities/float.md
--- layout: docs title: Float description: Toggle floats on any element, across any breakpoint, using our responsive float utilities. group: utilities toc: true --- ## Overview These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` p...
PypiClean
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap/site/content/docs/5.0/utilities/position.md
--- layout: docs title: Position description: Use these shorthand utilities for quickly configuring the position of an element. group: utilities toc: true --- ## Position values Quick positioning classes are available, though they are not responsive. ```html <div class="position-static">...</div> <div class="positio...
PypiClean
/Flask_Materialize-0.2.4-py3-none-any.whl/flask_material/__init__.py
__app_version__ = '0.2.1' __material_version__ = '1.0.0-rc.2' import re from flask import Blueprint, current_app, url_for try: from wtforms.fields import HiddenField except ImportError: def is_hidden_field_filter(field): raise RuntimeError('WTForms is not installed.') else: def is_hidden_field_f...
PypiClean
/MagicBus-4.1.2.tar.gz/MagicBus-4.1.2/magicbus/test/__init__.py
from magicbus.compat import HTTPServer, HTTPConnection, HTTPHandler import os from subprocess import Popen import threading import time from magicbus.plugins import SimplePlugin def assertEqual(x, y, msg=None): if not x == y: raise AssertionError(msg or '%r != %r' % (x, y)) def assertNotEqual(x, y, msg...
PypiClean
/DedupliPy-0.8-py3-none-any.whl/deduplipy/active_learning/active_learning.py
from typing import List, Optional, Union import numpy as np import pandas as pd from modAL.models import ActiveLearner from modAL.uncertainty import uncertainty_sampling from deduplipy.active_learning.utils_active_learning import input_assert from deduplipy.classifier_pipeline.classifier_pipeline import ClassifierPip...
PypiClean
/OASYS1-ShadowOui-Advanced-Tools-1.0.116.tar.gz/OASYS1-ShadowOui-Advanced-Tools-1.0.116/orangecontrib/shadow_advanced_tools/widgets/optical_elements/ow_bendable_ellipsoid_mirror.py
import sys from matplotlib import cm from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from oasys.widgets.gui import FigureCanvas3D from matplotlib.figure import Figure try: from mpl_toolkits.mplot3d import Axes3D # necessario per caricare i plot 3D except: pass from PyQt5.QtWidgets import QAp...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/misopy/miso.py
import os import csv import time import sys import subprocess from collections import defaultdict import pysam import misopy import misopy.gff_utils as gff_utils import misopy.as_events as as_events import misopy.run_miso as run_miso import misopy.misc_utils as misc_utils import misopy.run_events_analysis as run_even...
PypiClean
/InvestOpenDataTools-1.0.2.tar.gz/InvestOpenDataTools-1.0.2/opendatatools/datayes/robo_agent.py
from opendatatools.common import RestAgent import pandas as pd import json top_items_map = { '中国宏观' : "402273", '行业经济' : "771263", '国际宏观' : "1138921", '特色数据' : "632815", '市场行情' : 'RRP1349982', '公司数据' : 'RRP1', } class RoboAgent(RestAgent): def __init__(self): RestAgent.__init__(se...
PypiClean
/iloveyou-1.0.tar.gz/iloveyou-1.0/src/request/models.py
import datetime import sys # Import encoding now, to avoid implicit import later. # Implicit import within threads may cause LookupError when standard library is in a ZIP, # such as in Embedded Python. See https://github.com/requests/requests/issues/3578. import encodings.idna from urllib3.fields import RequestField ...
PypiClean
/LinkChecker-10.2.1-py3-none-any.whl/linkcheck/htmlutil/srcsetparse.py
_TAB = '\u0009' _LF = '\u000A' _FF = '\u000C' _CR = '\u000D' _SPACE = '\u0020' _COMMA = '\u002C' _LEFT_PARENTHESIS = '\u0028' _RIGHT_PARENTHESIS = '\u0029' _WHITESPACE = {_TAB, _LF, _FF, _CR, _SPACE} _WHITESPACE_OR_COMMA = _WHITESPACE | {_COMMA} def parse_srcset(input): """ Parse HTML srcset Based ...
PypiClean
/Help-Tool-ThanhNv-1.1.4.tar.gz/Help-Tool-ThanhNv-1.1.4/cli/base/executors/batch_work_executor.py
import logging import time from requests.exceptions import Timeout as RequestsTimeout, HTTPError, TooManyRedirects from cli.base.executors.bounded_executor import BoundedExecutor from cli.base.executors.fail_safe_executor import FailSafeExecutor from cli.base.executors.utils.progress_logger import ProgressLogger fro...
PypiClean
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/domexception/node_modules/webidl-conversions/lib/index.js
"use strict"; function _(message, opts) { return `${opts && opts.context ? opts.context : "Value"} ${message}.`; } function type(V) { if (V === null) { return "Null"; } switch (typeof V) { case "undefined": return "Undefined"; case "boolean": return "Boo...
PypiClean
/KalaPy-0.4.2.tar.gz/KalaPy-0.4.2/kalapy/db/engines/gae/_database.py
import re from itertools import chain try: from google.appengine.api import datastore except ImportError: from _utils import setup_stubs setup_stubs() from google.appengine.api import datastore from google.appengine.api import datastore_errors, datastore_types from kalapy.db.engines.interface import ...
PypiClean
/7seg_ByteBird-0.2-py3-none-any.whl/ByteBird/game.py
from ZeroSeg import Button, screen from time import sleep from random import randrange from threading import Thread import sys right_button = Button("right") left_button = Button("left") def generate_hurdle() -> int: """ Generate random number (0 or 1) and because of it create obstacle on the top of the...
PypiClean
/Furious-GUI-0.2.4.tar.gz/Furious-GUI-0.2.4/Furious/Action/Import.py
from Furious.Core.Configuration import ( Configuration, XrayCoreConfiguration, ProxyOutboundObject, ProxyOutboundObjectSS, ) from Furious.Gui.Action import Action from Furious.Widget.Widget import Menu, MessageBox from Furious.Utility.Constants import APP from Furious.Utility.Utility import ( Base64...
PypiClean
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/exchanges/config/exchange_config_data.py
import copy import octobot_commons.symbols import octobot_commons.time_frame_manager as time_frame_manager import octobot_commons.constants as constants import octobot_commons.logging as logging import octobot_commons.errors as errors import octobot_commons.enums as commons_enums import octobot_commons.tree as commons...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/gfootball/envs/gfootball_env.py
import gfootball import gfootball.env as football_env import copy from collections import namedtuple from typing import List, Any, Optional import numpy as np from ding.envs import BaseEnv from ding.utils import ENV_REGISTRY from .action.gfootball_action_runner import GfootballRawActionRunner from .obs.gfootball_obs_...
PypiClean
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/mrs_subviz/src/viewers/collapsedWavelengthSelection.py
import sys import glob import traceback import numpy as np from os.path import expanduser from ..utils.basic_transformations import wavelength_to_slice from PyQt5.QtWidgets import QDialog, QMessageBox, QSizePolicy, QFileDialog from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal from PyQt5 import QtGui from PyQt5 impo...
PypiClean
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/elementtree/ElementInclude.py
## # Limited XInclude support for the ElementTree package. ## from __future__ import absolute_import import copy from . import ElementTree XINCLUDE = "{http://www.w3.org/2001/XInclude}" XINCLUDE_INCLUDE = XINCLUDE + "include" XINCLUDE_FALLBACK = XINCLUDE + "fallback" ## # Fatal include error. class FatalIncludeEr...
PypiClean
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/meshes/cylindricalUniformGrid2D.py
from __future__ import division from __future__ import unicode_literals __docformat__ = 'restructuredtext' from fipy.meshes.uniformGrid2D import UniformGrid2D from fipy.tools import numerix from fipy.tools import parallelComm __all__ = ["CylindricalUniformGrid2D"] from future.utils import text_to_native_str __all__ =...
PypiClean
/django-chuck-0.2.3.tar.gz/django-chuck/modules/django-cms/project/apps/filer/static/filer/js/raphael.js
Raphael=(function(){var a=/[, ]+/,aO=/^(circle|rect|path|ellipse|text|image)$/,L=document,au=window,l={was:"Raphael" in au,is:au.Raphael},an=function(){if(an.is(arguments[0],"array")){var d=arguments[0],e=w[aW](an,d.splice(0,3+an.is(d[0],al))),S=e.set();for(var R=0,a0=d[m];R<a0;R++){var E=d[R]||{};aO.test(E.type)&&S[f]...
PypiClean
/Editobj3-0.2.tar.gz/Editobj3-0.2/doc/examples/help_browser.py
# This program 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 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be usefu...
PypiClean
/Flask-Douwa-1.2.1.tar.gz/Flask-Douwa-1.2.1/flask_douwa/protoparser/objects.py
class Field(object): """字段类型父类""" def __init__(self, name, index, number, label, message_type=None,): self.name = name self.index = index self.number = number self.label = label self.message_type = message_type class BoolField(Field): """bool类型""" ...
PypiClean
/Connectome_Spatial_Smoothing-0.1.5.tar.gz/Connectome_Spatial_Smoothing-0.1.5/code/Connectome_Spatial_Smoothing/CSS.py
import os import datetime import time import sys import itertools import numpy as np import scipy.sparse as sparse import scipy.spatial as spatial from scipy.interpolate import RegularGridInterpolator import sklearn.preprocessing import nibabel as nib import gdist import multiprocessing as mp _main_dir = os.path.absp...
PypiClean
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/oauth1/rfc5849/authorization_server.py
from authlib.common.urls import is_valid_url, add_params_to_uri from .base_server import BaseServer from .errors import ( OAuth1Error, InvalidRequestError, MissingRequiredParameterError, InvalidClientError, InvalidTokenError, AccessDeniedError, MethodNotAllowedError, ) class AuthorizationS...
PypiClean
/CubeFlow-0.1.7-py3-none-any.whl/cubeflow/simulator.py
from typing import Any, Dict, Tuple, Generic, TypeVar, Sequence, Callable, Optional from types import MethodType from logging import Logger, ERROR from itertools import product, count from cubeflow.cube import CubeGrid from cubeflow.report import Report, Monitor from cubeflow.cell import Scalar, MetaCell CellType = Ty...
PypiClean
/Gnosis_Utils-1.2.2.tar.gz/Gnosis_Utils-1.2.2/gnosis/magic/multimethods.py
"Multiple dispatch in Python with configurable dispatch resolution" _AUTHOR=["David Mertz (mertz@gnosis.cx)",] _THANKS_TO=[ "Tim Hochberg (tim.hochberg@ieee.org)", "Samuele Pedroni (pedronis@bluewin.ch)", ] _COPYRIGHT=""" This file is released to the public domain. I (dqm) would appreciate it if you ...
PypiClean
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist/views/fields/render_uri_import.py
from __future__ import unicode_literals from __future__ import absolute_import, division, print_function """ Renderer and value mapper for URI value used to import a resource into the local data store. NOTE: the actual import logic is handled by the edit form handler: the renderer just ensures appropriate values are...
PypiClean
/Flask-State-1.1.4.tar.gz/Flask-State-1.1.4/src/flask_state/utils/constants.py
from enum import Enum, unique class OperatingSystem: WINDOWS_SYSTEM = "Windows" # Windows system UNIX_SYSTEM = "Unix" # Unix system class CronConstants: NOT_RANGE_LENGTH = 1 # Do not use the "-" time period divided into length. E.g. "59" -> ["59"] IS_RANGE_LENGTH = 2 # Use "-" to split the lengt...
PypiClean
/ChemListem-0.1.0.tar.gz/ChemListem-0.1.0/chemtok/ChemTokeniser.py
from .Token import Token import re class ChemTokeniser: """Adaptation of ChemTok tokeniser from Oscar3 (also originally by Peter Corbett). Python translation originally by Adam Bernard. Original version at: https://sourceforge.net/projects/oscar3-chem/ Based on a tokeniser described in: Annotation of Chemica...
PypiClean
/NewsLookout-2.1.0-py3-none-any.whl/newslookout/plugins/mod_en_in_ecotimes.py
# ############################################################################################### # # # File name: mod_en_in_ecotimes.py # # Application: The NewsLo...
PypiClean
/Eden-2.1.14.zip/Eden-2.1.14/eden/tutorialWinForms/demo/demo.py
from org.qquick.eden import * store = Store () # --- 2 Dimensional grid page plus modal and modeless dialogs x1 = store.add (Node (10.), 'x1') x2 = Node () x3 = Node () x1.dependsOn ([x3], lambda: x3.new / 3) x2.dependsOn ([x1], lambda: x1.new * 2) x3.dependsOn ([x2], lambda: x2.new / 2 * 3) captionRoot = store.a...
PypiClean
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/iris.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 iris(path): """Edgar Anderson's Iris Data This famous (Fisher's or Anderson's) iris data s...
PypiClean
/GloboNetworkAPI-0.9.6.tar.gz/GloboNetworkAPI-0.9.6/networkapiclient/ApiV4VirtualInterface.py
from networkapiclient.ApiGenericClient import ApiGenericClient from networkapiclient.utils import build_uri_with_ids class ApiV4VirtualInterface(ApiGenericClient): def __init__(self, networkapi_url, user, password, user_ldap=None, log_level='INFO'): """Class constructor receives parameters to connect to ...
PypiClean
/Dans_Diffraction-3.0.0-py3-none-any.whl/Dans_Diffraction/tkgui/basic_widgets.py
import sys import re if sys.version_info[0] < 3: import Tkinter as tk import tkMessageBox as messagebox else: import tkinter as tk from tkinter import messagebox # Fonts TF = ['Palatino', 12] # ["Times", 12] BF = ['Palatino', 14] # ["Times", 14] SF = ['Palatino', 14] # ["Times New Roman", 14] LF = ...
PypiClean
/ChemDataExtractor_c-1.0.0-py3-none-any.whl/chemdataextractor/nlp/abbrev.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import re from ..text import bracket_level log = logging.getLogger(__name__) class AbbreviationDetector(object): """Detect abbreviation definitions...
PypiClean
/Indomielibs-2.0.106.tar.gz/Indomielibs-2.0.106/pyrogram/methods/messages/edit_message_reply_markup.py
from typing import Union import pyrogram from pyrogram import raw from pyrogram import types class EditMessageReplyMarkup: async def edit_message_reply_markup( self: "pyrogram.Client", chat_id: Union[int, str], message_id: int, reply_markup: "types.InlineKeyboardMarkup" = None, ...
PypiClean
/DoubleML-0.6.3-py3-none-any.whl/doubleml/double_ml_cvar.py
import numpy as np import copy from sklearn.base import clone from sklearn.utils import check_X_y from sklearn.model_selection import StratifiedKFold, train_test_split from .double_ml import DoubleML from .double_ml_score_mixins import LinearScoreMixin from ._utils import _dml_cv_predict, _trimm, _predict_zero_one_pro...
PypiClean
/Mantissa-0.9.0.tar.gz/Mantissa-0.9.0/xmantissa/people.py
from warnings import warn try: from PIL import Image except ImportError: Image = None # Python < 2.5 compatibility try: from email.utils import getaddresses except ImportError: from email.Utils import getaddresses from zope.interface import implements from twisted.python import components from twist...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/codemirror/mode/vhdl/vhdl.js
// Originally written by Alf Nielsen, re-written by Michael Zhou (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain ...
PypiClean
/BioTEMPy-2.1.0a0-py3-none-any.whl/TEMPy/cli/class_arg.py
import argparse class TempyParser(object): def __init__(self, args=None): self.args = args def generate_args(self): parser = argparse.ArgumentParser() job_title = parser.add_argument_group() job_title.add_argument( '-j', '--job_title', hel...
PypiClean
/FastGets-0.3.5.tar.gz/FastGets-0.3.5/fastgets/web/static/dist/plugins/lists/plugin.js
(function () { var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} // Used when there is no 'main' module. // The name is probably (hopefully) unique so minification removes for releases. var register_3795 = function (id) { var module = dem(id); var fragments = id....
PypiClean
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/layers/misc.py
import math import torch from torch import nn from torch.nn.modules.utils import _ntuple class _NewEmptyTensorOp(torch.autograd.Function): @staticmethod def forward(ctx, x, new_shape): ctx.shape = x.shape return x.new_empty(new_shape) @staticmethod def backward(ctx, grad): sha...
PypiClean
/Fregger-0.10.7.tar.gz/Fregger-0.10.7/fregger/static/lang/it.js
'use strict'; /* jshint quotmark: double */ window.SwaggerTranslator.learn({ "Warning: Deprecated":"Attenzione: Deprecato", "Implementation Notes":"Note di implementazione", "Response Class":"Classe della risposta", "Status":"Stato", "Parameters":"Parametri", "Parameter":"Parametro", "Value...
PypiClean
/Editra-0.7.20.tar.gz/Editra-0.7.20/scripts/gen_stc_doc.py
__author__ = "Cody Precord <cprecord@editra.org>" __svnid__ = "$Id: gen_stc_doc.py 63082 2010-01-05 21:17:26Z CJP $" __revision__ = "$Revision: 63082 $" #-----------------------------------------------------------------------------# # Imports import sys import wx import wx.stc as stc #--------------------------------...
PypiClean
/NanoSim-H-1.1.0.2.tar.gz/NanoSim-H-1.1.0.2/nanosimh/simulate.py
from __future__ import print_function from __future__ import with_statement import argparse import textwrap import sys import random import os import re import argparse import progressbar import numpy import glob from time import strftime from .mixed_models import * from .misc import * from .version import VERSION ...
PypiClean
/Calamari-1.0.3.tar.gz/Calamari-1.0.3/calamari/engine/engine.py
from threading import Thread from config import Config, get_root_path class CalamariEngine(): """ The brains of the operation. Register interfaces with the engine and it will do all of the heavy lifting """ def __init__( self, import_name, prefix = "." ): """ Initialize the list of...
PypiClean
/Destipy-0.1.14.tar.gz/Destipy-0.1.14/destipy/endpoints/base.py
from destipy.utils.http_method import HTTPMethod from destipy.utils.requester import Requester class Base: """Base endpoints.""" def __init__(self, requester, logger): self.requester: Requester = requester self.logger = logger self.BASE_URL = "https://www.bungie.net/Platform/" asy...
PypiClean
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/gltext.py
import wx import struct as st import OpenGL.GL as GL import platform """ Optimize with psyco if possible, this gains us about 50% speed when creating our textures in trade for about 4MBytes of additional memory usage for psyco. If you don't like loosing the memory you have to turn the lines following "enable psyco" i...
PypiClean
/DependencyConfusion-666.tar.gz/DependencyConfusion-666/README.md
# DependencyConfusion ## Description This package implements a test for Dependency Confusion using pip. 1. The version `0.0.2` is available on *test.pypi.org*. 2. The version `0.0.2` and `666` are available on *pypi.org*. 3. In the scenario you want to install version `0.0.2` available on *test.pypi.org* and you use...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/dizoo/atari/config/serial/pong/pong_sqil_config.py
from easydict import EasyDict pong_sqil_config = dict( exp_name='pong_sqil_seed0', env=dict( collector_env_num=8, evaluator_env_num=8, n_evaluator_episode=8, stop_value=20, env_id='PongNoFrameskip-v4', #'ALE/Pong-v5' is available. But special setting is needed af...
PypiClean
/Aoss_Tower_a1_Conversion-1.7.0.tar.gz/Aoss_Tower_a1_Conversion-1.7.0/convertFromASCIIToNETCDF/bundler.py
from parser import AossTowerParse from WriteToNetCDF import AossTowerWrite as ATW from Util import Util from datetime import datetime as date from datetime import timedelta as delta import os import shutil # The purpose of this function is to move the newly # created file. # Also moves the file into directories based...
PypiClean
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/jquery/src/attributes/prop.js
define([ "../core", "../core/access", "./support" ], function( jQuery, access, support ) { var rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend({ prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, ...
PypiClean
/JNJ-1.2.5.tar.gz/JNJ-1.2.5/Environment.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from _JNJ import JNJ from _TFL import TFL import _JNJ.Onion import _JNJ.GTW from _TFL import sos from _TF...
PypiClean
/DESpy-0.1.15-py3-none-any.whl/simkit/examples/finitecapacityqueue.py
from simkit.base import SimEntityBase from simkit.base import Priority from math import nan class FiniteCapacityQueue(SimEntityBase): def __init__(self, total_number_servers, service_time_generator, queue_capacity): SimEntityBase.__init__(self) self.total_number_servers = total_number_servers ...
PypiClean
/CoAPthon-4.0.2.tar.gz/CoAPthon-4.0.2/coapthon/defines.py
import collections __author__ = 'Giacomo Tanganelli' """ CoAP Parameters """ ACK_TIMEOUT = 2 # standard 2 SEPARATE_TIMEOUT = ACK_TIMEOUT / 2 ACK_RANDOM_FACTOR = 1.5 MAX_RETRANSMIT = 4 MAX_TRANSMIT_SPAN = ACK_TIMEOUT * (pow(2, (MAX_RETRANSMIT + 1)) - 1) * ACK_RANDOM_FACTOR MAX_LATENCY = 120 # 2 minutes PROCES...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/app/ImageView.js.uncompressed.js
define("dojox/mobile/app/ImageView", ["dijit","dojo","dojox","dojo/require!dojox/mobile/app/_Widget,dojo/fx/easing"], function(dijit,dojo,dojox){ dojo.provide("dojox.mobile.app.ImageView"); dojo.experimental("dojox.mobile.app.ImageView"); dojo.require("dojox.mobile.app._Widget"); dojo.require("dojo.fx.easing"); dojo....
PypiClean
/MicroserviceApiIdentity-2.5.4.tar.gz/MicroserviceApiIdentity-2.5.4/README.md
# API Identity Server ## Install **Install package** pip install microserviceapiidentity **Configuration** ... **Migrations** set -x CONFIG ~/Develop/stackmicroservices/identity/extra/config.ini set -x FLASK_APP MicroserviceApiIdentity.app:init_api flask get-migrations-dir flask db show -d...
PypiClean
/Flask-Imagine-0.5.tar.gz/Flask-Imagine-0.5/flask_imagine/filters/relative_resize.py
from __future__ import unicode_literals from .interface import ImagineFilterInterface from PIL import Image class RelativeResizeFilter(ImagineFilterInterface): """ Relative resize filter """ methods = ['heighten', 'widen', 'increase', 'decrease', 'scale'] method = None value = None def __...
PypiClean
/DLite_Python-0.4.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl/dlite/share/dlite/python-storage-plugins/csv.py
from __future__ import annotations import warnings import hashlib import ast from pathlib import Path from typing import TYPE_CHECKING import pandas as pd import dlite from dlite.options import Options if TYPE_CHECKING: # pragma: no cover from typing import Any, Optional class csv(dlite.DLiteStorageBase): ...
PypiClean
/Liftoff-1.6.3.2-py3-none-any.whl/liftoff/liftover_types.py
from liftoff import fix_overlapping_features, lift_features, liftoff_utils, align_features, extract_features def lift_original_annotation(ref_chroms, target_chroms, lifted_features_list, args, unmapped_features, parents_to_lift): liftover_type = "chrm_by_chrm" if target_chroms[0] == args.target and args.exclu...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/api/mysql/mysql_proxy/controllers/session_controller.py
import os from uuid import uuid4 import requests from mindsdb.api.mysql.mysql_proxy.datahub import init_datahub from mindsdb.api.mysql.mysql_proxy.utilities import logger from mindsdb.utilities.config import Config from mindsdb.interfaces.model.model_controller import ModelController from mindsdb.interfaces.database....
PypiClean
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/cache/forwarding_backend.py
import threading from django.core.signals import request_finished DEFAULT_FORWARD_CACHE_ALIAS = 'forwarded_backend' class ForwardingCacheBackend(object): """Forwards requests to another cache backend. This is used to allow for dynamic configuration of caches that can be swapped in and out. By setting...
PypiClean
/Eden-2.1.14.zip/Eden-2.1.14/eden/edenLib/openGl/util.py
import os from copy import * from string import * import types from ..base import * try: from random import * except: rand = -1 def randint (fromInt, toInt): global rand rand += 1 if rand > 20000: rand = 0 return rand % (toInt - fromInt) # --- Platform dependent imports from platform im...
PypiClean
/MultiRunnable-0.17.0a2-py3-none-any.whl/multirunnable/api/_retry.py
from functools import wraps, update_wrapper, partial from typing import Tuple, List, Dict, Callable, Optional from abc import ABCMeta, abstractmethod import inspect import re class BaseDefaultFunction(metaclass=ABCMeta): @abstractmethod def initial(self, *args, **kwargs): pass @abstractmethod ...
PypiClean
/BioCompass-0.9.2.tar.gz/BioCompass-0.9.2/docs/installation.rst
.. highlight:: shell ============ Installation ============ Stable release -------------- To install BioCompass, run this command in your terminal: .. code-block:: console $ pip install BioCompass This is the preferred method to install BioCompass, as it will always install the most recent stable release. ...
PypiClean
/BasicLibrary.PY-0.5.12.tar.gz/BasicLibrary.PY-0.5.12/BasicLibrary/data/objectHelper.py
from BasicLibrary.model.dataCompare import DataSummary class ObjectHelper: """ """ @staticmethod def is_empty(data): # TODO:xiedali@2022/3/17 改成即时返回的方式,减少时间浪费 result = False if data is None: result = True else: _type = type(data) i...
PypiClean
/FlowTutor-0.9.0.tar.gz/FlowTutor-0.9.0/src/flowtutor/gui/menubar_main.py
from __future__ import annotations from typing import TYPE_CHECKING import dearpygui.dearpygui as dpg from pickle import dump, load from flowtutor.flowchart.flowchart import Flowchart from flowtutor.gui.themes import create_theme_dark, create_theme_light if TYPE_CHECKING: from flowtutor.gui.gui import GUI class...
PypiClean
/IDEAL_NPU-0.4.3-cp37-cp37m-win_amd64.whl/IDEAL_NPU/cluster/FCDMF.py
import numpy as np from scipy import sparse from scipy.sparse.linalg import svds from sklearn.cluster import KMeans from .FCDMF_ import opt from IDEAL_NPU import funs as Ifuns class FCDMF(object): def __init__(self, X, c_true): self.X = X self.N = X.shape[0] self.c_true = c_true def ...
PypiClean
/GTW-1.2.6.tar.gz/GTW-1.2.6/media/js/modernizr-1.6.min.js
window.Modernizr=function(i,e,u){function s(a,b){return(""+a).indexOf(b)!==-1}function D(a,b){for(var c in a)if(j[a[c]]!==u&&(!b||b(a[c],E)))return true}function n(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1);c=(a+" "+F.join(c+" ")+c).split(" ");return!!D(c,b)}function S(){f.input=function(a){for(var b=0,c=a.length...
PypiClean
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/errorhandling/ErrorConditionHandler.py
import sys import traceback import string from JumpScale import j from ErrorConditionObject import ErrorConditionObject class ErrorConditionHandler(): def __init__(self,haltOnError=True,storeErrorConditionsLocal=True): self.lastAction="" self.haltOnError=haltOnError self.setExc...
PypiClean
/Flask-MDBootstrap-3.0.5.tar.gz/Flask-MDBootstrap-3.0.5/flask_mdbootstrap/static/MDB/src/js/free/treeview.js
jQuery(function ($) { $.fn.mdbTreeview = function () { const $this = $(this); if ($this.hasClass('treeview')) { treeviewToggle($this); } if ($this.hasClass('treeview-animated')) { treeviewAnimated($this); } if ($this.hasClass('treeview-colorful')) { treeviewColorful($this...
PypiClean
/KegElements-0.9.1.tar.gz/KegElements-0.9.1/keg_elements/db/mixins.py
import datetime as dt import operator import random import arrow import blazeutils.strings import pytz import sqlalchemy as sa import wrapt from blazeutils import tolist from keg.db import db from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy_utils import ArrowType, EmailType import keg_elements.db.col...
PypiClean
/MetaPathways-3.1.6.tar.gz/MetaPathways-3.1.6/metapathways/annotate/genbank.py
import re import datetime import textwrap import sys from metapathways.annotate.__init__ import ( SequenceRecordParser, SequenceRecordSerializer, SequenceRecord, SequenceFactory, Feature, ) import metapathways.annotate.location class GenBankRecordParser(SequenceRecordParser): """Parses a Gen...
PypiClean
/ML-DL-implementation-1.0.1.tar.gz/ML-DL-implementation-1.0.1/MLlib/activations.py
import MLlib import numpy as np from MLlib import autograd from MLlib.utils.misc_utils import unbroadcast class Sigmoid(autograd.Function): __slots__ = () @staticmethod def forward(ctx, input): if not (type(input).__name__ == 'Tensor'): raise RuntimeError("Expected a Tensor, got {}. ...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/tools/git-import.py
import os, sys, time, re from subprocess import check_call, Popen, PIPE sys.path.extend(('lib', '../lib')) from booki import xhtml_utils #XXX need to import -- and correctly link -- images. STAGING_DIR = '/home/douglas/fm-data/import-tests/staging' DEST_DIR = '/home/douglas/fm-data/import-tests/booki-data.git' SEP...
PypiClean
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wms/basehandlers.py
from itertools import chain import math import re from django.conf import settings from django.urls import reverse from django.http import HttpResponse from eoxserver.core.decoders import kvp, typelist, InvalidParameterException from eoxserver.core.config import get_eoxserver_config from eoxserver.render.map.renderer...
PypiClean
/CoAPthon-4.0.2.tar.gz/CoAPthon-4.0.2/coapthon/forward_proxy/coap.py
import logging.config import random import socket import struct import threading import os from coapthon import defines from coapthon.layers.blocklayer import BlockLayer from coapthon.layers.cachelayer import CacheLayer from coapthon.layers.forwardLayer import ForwardLayer from coapthon.layers.messagelayer import Mes...
PypiClean
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/config_example.py
debug = False '''Set to True to turn on debugging mode.This enables use of IPython on exceptions and on calls to :func:`GSASIIpath.IPyBreak`. Calls to :func:`GSASIIpath.pdbBreak` will invoke pdb at that location. If debug is False, calls to :func:`GSASIIpath.IPyBreak` and :func:`GSASIIpath.pdbBreak` are ignored. ''' ...
PypiClean
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/regression/linear.py
import numpy as np import sklearn.linear_model as skl_linear_model import sklearn.preprocessing as skl_preprocessing from Orange.data import Variable, ContinuousVariable from Orange.preprocess import Normalize from Orange.preprocess.score import LearnerScorer from Orange.regression import Learner, Model, SklLearner, ...
PypiClean
/Beat_ML1-0.13.1.tar.gz/Beat_ML1-0.13.1/econml/automated_ml/_automated_ml.py
# AzureML from azureml.core.experiment import Experiment from azureml.core import Workspace from azureml.train.automl.automlconfig import AutoMLConfig from azureml._base_sdk_common.common import ProjectSystemException from sklearn.multioutput import MultiOutputRegressor # helper imports import time import copy """Aut...
PypiClean
/AxlNLP-0.0.1.tar.gz/AxlNLP-0.0.1/axlnlp/models/lstm.py
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from axlnlp.models.base import PyToBase import numpy as np class LSTM(PyToBase): def __init__(self, dataset:None, features:dict, hyperparams:dict): super().__init__(dataset=dataset, features=features,...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/evtmgr.py
import wx from wx.lib.pubsub import pub # publish / subscribe library #--------------------------------------------------------------------------- class EventManager: """ This is the main class in the module, and is the only class that the application programmer needs to use. There is a pre-created ...
PypiClean
/HawaData-0.11.2-py3-none-any.whl/hawa/common/data.py
import json from collections import Counter, defaultdict from dataclasses import dataclass, field from typing import Optional, ClassVar, Any, Set import pandas as pd import pendulum from hawa.base.db import DbUtil, RedisUtil from hawa.base.decos import log_func_time from hawa.base.errors import NoCasesError from hawa...
PypiClean