id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/FinDates-0.2.zip/FinDates-0.2/findates/dateutils.py | import datetime
import string
# Not that we expect that number of days in the week changes any time soon
# but having symbolic name in the source code is more descriptive and easier to search
DAYS_IN_WEEK = 7
MONTHS_IN_YEAR = 12
DAYS_IN_NON_LEAP_YEAR = 365
DAYS_IN_LEAP_YEAR = 366
_datetime_format_strings = dict({
... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/README.md | # Flask-Statics-Helper
Provides Bootstrap3 and other static resources in a modular fashion.
The main purpose of this extension is to "modularize" static resources (css and js files) on a per-template basis. In a
large Flask application, all views/templates don't use the same static resource such as d3js. If only one ... | PypiClean |
/Ngoto-0.0.39-py3-none-any.whl/ngoto/core/util/rich/logging.py | import logging
from datetime import datetime
from logging import Handler, LogRecord
from pathlib import Path
from types import ModuleType
from typing import ClassVar, Iterable, List, Optional, Type, Union
from ngoto.core.util.rich._null_file import NullFile
from . import get_console
from ._log_render import FormatTim... | PypiClean |
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/kitchen_sink/static/ks/ckeditor/plugins/a11yhelp/dialogs/lang/ug.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","ug",{title:"قوشۇمچە چۈشەندۈرۈش",contents:"ياردەم مەزمۇنى. بۇ سۆزلەشكۈنى ياپماقچى بولسىڭىز ESC نى بېسىڭ.",legend:[{name:"ئادەتتىكى",items:... | PypiClean |
/CodernityDB-HTTP-0.4.1.tar.gz/CodernityDB-HTTP-0.4.1/CodernityDBHTTP/interface/scripts/lib/codemirror/codemirror.js |
// CodeMirror is the only global var we claim
var CodeMirror = (function() {
// This is the function that produces an editor instance. Its
// closure is used to store the editor state.
function CodeMirror(place, givenOptions) {
// Determine effective options based on given values and defaults.
var option... | PypiClean |
/Autologging-1.3.2.zip/Autologging-1.3.2/README.md | # Autologging - easier logging and tracing for Python classes
http://ninthtest.info/python-autologging/
[](https://pypi.python.org/pypi/Autologging)
[](https://pypi.python.org/pypi/Au... | PypiClean |
/MultiPyDown-0.0.2-py3-none-any.whl/pydown/main.py | from concurrent.futures.thread import ThreadPoolExecutor
import threading
import time
from pySmartDL import SmartDL
download_list = ["http://dl2.soft98.ir/soft/m/MKVToolnix.43.0.0.x64.zip?1580074028",
"http://dl2.soft98.ir/soft/m/MKVToolnix.43.0.0.x86.zip?1580074028",
"http://dl2.soft... | PypiClean |
/NucleoATAC-0.3.4.tar.gz/NucleoATAC-0.3.4/nucleoatac/run_nfr.py | import multiprocessing as mp
import numpy as np
import os
import traceback
import itertools
import pysam
from pyatac.utils import shell_command, read_chrom_sizes_from_fasta, read_chrom_sizes_from_bam
from pyatac.chunk import ChunkList
from nucleoatac.NFRCalling import NFRParameters, NFRChunk
from pyatac.bias import PWM... | PypiClean |
/DeepRank-GNN-0.1.22.tar.gz/DeepRank-GNN-0.1.22/deeprank_gnn/tools/StructureSimilarity.py | import numpy as np
import pdb2sql
import os
import pickle
def _printif(string, cond): return print(string) if cond else None
class StructureSimilarity(object):
def __init__(self, decoy, ref, verbose=False):
"""Compute the structure similarity between different molecules.
This class allows to c... | PypiClean |
/Kiosk_Client-0.8.4.tar.gz/Kiosk_Client-0.8.4/kiosk_client/manager.py | """Manager class used to create and manage jobs"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import logging
import os
import timeit
import uuid
import requests
from google.cloud import storage as google_storage
from twisted.internet import... | PypiClean |
/Marl-Factory-Grid-0.1.2.tar.gz/Marl-Factory-Grid-0.1.2/marl_factory_grid/algorithms/static/TSP_item_agent.py | import numpy as np
from marl_factory_grid.algorithms.static.TSP_base_agent import TSPBaseAgent
from marl_factory_grid.modules.items import constants as i
future_planning = 7
inventory_size = 3
MODE_GET = 'Mode_Get'
MODE_BRING = 'Mode_Bring'
class TSPItemAgent(TSPBaseAgent):
def __init__(self, *a... | PypiClean |
/DepartmnetHelper-1.0.0.tar.gz/DepartmnetHelper-1.0.0/application/services.py | from application import db
from application.models import Department
from application.models import User
from application.models import Employee
def get_department():
return Department.query.all()
def create_department(name):
department = Department(name=name)
db.session.add(department)
db.session.com... | PypiClean |
/Dts-OpenFisca-Core-34.8.0.tar.gz/Dts-OpenFisca-Core-34.8.0/openfisca_core/scripts/migrations/v24_to_25.py |
import argparse
import os
import glob
from ruamel.yaml.comments import CommentedSeq
from openfisca_core.scripts import add_tax_benefit_system_arguments, build_tax_benefit_system
from ruamel.yaml import YAML
yaml = YAML()
yaml.default_flow_style = False
yaml.width = 4096
TEST_METADATA = {'period', 'name', 'reforms'... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/proxy.py | import copy
import functools
import re
from collections import OrderedDict
from random import Random
from typing import Any, Callable, Dict, List, Optional, Pattern, Sequence, Tuple, TypeVar, Union
from .config import DEFAULT_LOCALE
from .exceptions import UniquenessException
from .factory import Factory
from .genera... | PypiClean |
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/IsomDevices_pb2.py |
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf i... | PypiClean |
/IMNN-0.3.2-py3-none-any.whl/imnn/lfi/gaussian_approximation.py | import jax
import jax.numpy as np
from jax.scipy.stats import norm, multivariate_normal
from imnn.lfi import LikelihoodFreeInference
class GaussianApproximation(LikelihoodFreeInference):
"""Uses Fisher information and parameter estimates approximate marginals
Since the inverse of the Fisher information matri... | PypiClean |
/Game%20Scorer-1.0.tar.gz/Game Scorer-1.0/README.md | # Тема: підбір комп'ютерних ігор на основі профілю користувача
### Короткий опис
На основі профілю, який ви зможете створити після
опитування про ваші вподобання, алгоритмічно-обрана рекомендація ігор, які можуть вам сподобатись.
---
Оскільки рекомендація має бути персональною для кожного користувача, підхід за... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ace/snippets/erlang.js | ace.define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) {
"use strict";
exports.snippetText = "# module and export all\n\
snippet mod\n\
-module(${1:`Filename('', 'my')`}).\n\
\n\
-compile([export_all]).\n\
\n\
start() ->\n\
${2}\n\
\n\
stop() ->\n\
ok.\n\
#... | PypiClean |
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/src/htsql/tweak/shell/vendor/codemirror-2.13/mode/ruby/ruby.js | CodeMirror.defineMode("ruby", function(config, parserConfig) {
function wordObj(words) {
var o = {};
for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
return o;
}
var keywords = wordObj([
"alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else",
... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/gui/qt/amountedit.py |
from decimal import Decimal
from PyQt5.QtCore import pyqtSignal, Qt
from PyQt5.QtGui import QPalette, QPainter, QFontMetrics
from PyQt5.QtWidgets import (QLineEdit, QStyle, QStyleOptionFrame)
from .util import char_width_in_lineedit
from electrum.util import (format_satoshis_plain, decimal_point_to_base_unit_name,
... | PypiClean |
/125softNLP-0.0.1-py3-none-any.whl/pysoftNLP/ner/kashgari/tasks/classification/dpcnn_model.py |
# author: Alex
# contact: ialexwwang@gmail.com
# version: 0.1
# license: Apache Licence
# file: dpcnn_model.py
# time: 2019-07-02 19:15
# Reference:
# https://ai.tencent.com/ailab/media/publications/ACL3-Brady.pdf
# https://github.com/Cheneng/DPCNN
# https://github.com/miracleyoo/DPCNN-TextCNN-Pytorch-Inception
# http... | PypiClean |
/OASYS1-XOPPY-1.2.10.tar.gz/OASYS1-XOPPY-1.2.10/orangecontrib/xoppy/util/script/python_script.py | __author__ = 'labx'
import sys
import code
import keyword
import itertools
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtGui import (
QTextCursor, QFont, QColor, QPalette
)
from PyQt5.QtCore import Qt, QRegExp, QItemSelectionModel
def text_format(foreground=Qt.black, weight=QFont.Normal):
fmt = QtGui.QT... | PypiClean |
/NameGenderPredictor-0.0.1.tar.gz/NameGenderPredictor-0.0.1/README.md | Prediction of genders of english names based on US Social Security data. The gender probability of each name is computed based on the number of male and female babies that were given this name between 1880 and 2017.
The full data can be found at https://www.ssa.gov/oact/babynames/limits.html
# Description
The main ... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct45.py | from genice2.cell import cellvectors
import genice2.lattices
desc = {"ref": {"SpaceFullerene": 'Sikiric 2010'},
"usage": "No options available.",
"brief": "A space fullerene."
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.pairs = """
31 128
36 ... | PypiClean |
/ModelFlowIb-1.56-py3-none-any.whl/modelclass2.py | import pandas as pd
import numpy as np
import subprocess
from itertools import chain,zip_longest
from numba import jit
import time
from modelclass import model
import modelclass as mc
import modelpattern as pt
import modelmf
class simmodel(model):
''' The model class, used to experiment
'''
def gou... | PypiClean |
/MDP-3.6.tar.gz/MDP-3.6/mdp/nodes/pca_nodes.py | from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
__docformat__ = "restructuredtext en"
import mdp
from mdp import numx
from mdp.utils import (mult, nongeneral_svd, CovarianceMatrix,
symeig, SymeigException)
import warnings as _war... | PypiClean |
/DeerLab-1.1.1.tar.gz/DeerLab-1.1.1/deerlab/correctphase.py | import numpy as np
from scipy.optimize import fminbound
def correctphase(V, full_output=False, offset=False):
r"""
Phase correction of complex-valued data.
Rotates the phase of complex-valued data ``V`` to minimize the imaginary component.
Among the two phases that minimize the imaginary part, the one... | PypiClean |
/LbSoftConfDBMigration-0.0.1.tar.gz/LbSoftConfDBMigration-0.0.1/LbSoftConfDB/py2neo/geoff.py |
# Copyright 2011-2012 Nigel Small
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/model/owlinearregression.py | from itertools import chain
from AnyQt.QtCore import Qt
from AnyQt.QtWidgets import QLayout, QSizePolicy
from Orange.data import Table, Domain, ContinuousVariable, StringVariable
from Orange.regression.linear import (
LassoRegressionLearner, LinearRegressionLearner,
RidgeRegressionLearner, ElasticNetLearner
)... | PypiClean |
/DelegatorBot-1.1.8.tar.gz/DelegatorBot-1.1.8/INSTALLATION.md | # Installation
These instructions are for Ubuntu 16.04 or later. Please use the appropriate commands for your system.
### Install MySQL
DelegatorBot Uses MySQL. In short, to install execute these commands.
```
sudo apt-get update
sudo apt-get install mysql-server
mysql_secure_installation
```
For a mo... | PypiClean |
/Dovetail-1.0beta2.tar.gz/Dovetail-1.0beta2/dovetail/directives/packages.py | # This class implements functions declared elsewhere and
# cannot control the arguments
# pylint: disable-msg=W0613
from setuptools.command import easy_install
from pkg_resources import working_set, parse_requirements, VersionConflict
from dovetail.model import TaskWrapper
from dovetail.util import Logger, MissingRequ... | PypiClean |
/Brian2-2.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/brian2/units/fundamentalunits.py | import collections
import itertools
import numbers
import operator
import sys
from typing import Callable
from warnings import warn
import numpy as np
from numpy import VisibleDeprecationWarning
from sympy import latex
__all__ = [
"DimensionMismatchError",
"get_or_create_dimension",
"get_dimensions",
... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/framework/middleware/functional/data_processor.py | import os
from typing import TYPE_CHECKING, Callable, List, Union, Tuple, Dict, Optional
from easydict import EasyDict
from ditk import logging
import torch
from ding.data import Buffer, Dataset, DataLoader, offline_data_save_type
from ding.data.buffer.middleware import PriorityExperienceReplay
from ding.framework impo... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/FoundationClassifier/csail_segmentation_tool/csail_seg/utils.py | import sys
import os
import logging
import re
import functools
import fnmatch
import numpy as np
def setup_logger(distributed_rank=0, filename="log.txt"):
logger = logging.getLogger("Logger")
logger.setLevel(logging.DEBUG)
# don't log results for the non-master process
if distributed_rank > 0:
... | PypiClean |
/2wf90-assignment-1.0.8.tar.gz/2wf90-assignment-1.0.8/src/2wf90_assignment/unused/addition_modulo.py | def add_function(x, y, b, m=None):
base = {'0':0,'1':1,'2':2,'3':3,
'4':4,'5':5,'6':6,'7':7,
'8':8,'9':9,'a':10,'b':11,
'c':12,'d':13,'e':14,'f':15}
X = str(x)
Y = str(y)
carry = 0
result = ''
if x == '0' and m is None:
return y
if y == '0' and m is None:
... | PypiClean |
/DeFiLlama-1.1.0.tar.gz/DeFiLlama-1.1.0/defillama/defillama.py | import requests
# --------- Constants --------- #
BASE_URL = "https://api.llama.fi"
# --------- Constants --------- #
class DefiLlama:
"""
DeFi Llama class to act as DeFi Llama's API client.
All the requests can be made through this class.
"""
def __init__(self):
"""
Initialize... | PypiClean |
/FreeClimb-4.5.0-py3-none-any.whl/freeclimb/model/incoming_number_result_all_of.py | import re # noqa: F401
import sys # noqa: F401
from freeclimb.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
vali... | PypiClean |
/Client_API_VN-2.11.1.tar.gz/Client_API_VN-2.11.1/README.rst | =============
Client_API_VN
=============
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/pypi/status/Client-API-VN
:alt: PyPI - Status
.. image:: https://img.shields.io/pypi/pyversions/Client-API-VN
:alt: PyPI - ... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/segmentation/gmm/visualisation.py | import os
import numpy
from matplotlib import cm, patches, pyplot
__all__ = ["visualise_3d_gmm", "visualise_2D_gmm"]
def plot_sphere(
w=0, c=(0, 0, 0), r=(1, 1, 1), sub_divisions=10, ax=None, sigma_multiplier=3
):
"""
plot a sphere surface
Input:
c: 3 elements list, sphere center
r: ... | PypiClean |
/OGN_Flogger-0.3.2a14.tar.gz/OGN_Flogger-0.3.2a14/src/flarm_db.py | import string
import requests
import sqlite3
import time
import flogger_settings
from flogger_OGN_db import ogndb
# import unicodedata
# def flarmdb (flarmnet, flogger_db, flarm_data):
def flarmdb (flarmnet, cursor, database, flarm_data, settings):
#
#-------------------------------------------------------... | PypiClean |
/AnkiServer-2.0.6.tar.gz/AnkiServer-2.0.6/anki-bundled/aqt/overview.py |
from aqt.utils import openLink, shortcut, tooltip
from anki.utils import isMac
import aqt
from anki.sound import clearAudioQueue
class Overview(object):
"Deck overview."
def __init__(self, mw):
self.mw = mw
self.web = mw.web
self.bottom = aqt.toolbar.BottomBar(mw, mw.bottomWeb)
... | PypiClean |
/EthTx-0.3.22.tar.gz/EthTx-0.3.22/ethtx/providers/static/tracer.js | {
// callstack is the current recursive call stack of the EVM execution.
callstack: [{}],
// descended tracks whether we've just descended from an outer transaction into
// an inner call.
descended: false,
returnData: undefined,
// step is invoked for every opcode that the VM executes.
step: function(log, db... | PypiClean |
/DFHypercode-0.0.1-py3-none-any.whl/Hypercode/reading/callable_decorators.py | import collections
import inspect
import typing
from ..classes import CallableBlock, Tag, JSONData, Arguments, Item
from ..enums import BlockType, CallableAction
from ..utils import remove_u200b_from_doc
from .reader import DFReader
class Function(CallableBlock):
"""Used to define a line of code that can be call... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/xmpp/bosh.js | if(!dojo._hasResource["dojox.xmpp.bosh"]){
dojo._hasResource["dojox.xmpp.bosh"]=true;
dojo.provide("dojox.xmpp.bosh");
dojo.require("dojo.io.script");
dojo.require("dojo.io.iframe");
dojo.require("dojox.xml.parser");
dojox.xmpp.bosh={transportIframes:[],initialize:function(_1){
this.transportIframes=[];
var _2=dojox._s... | PypiClean |
/KalturaApiClient-19.3.0.tar.gz/KalturaApiClient-19.3.0/KalturaClient/Plugins/ElasticSearch.py | from __future__ import absolute_import
from .Core import *
from ..Base import (
getXmlNodeBool,
getXmlNodeFloat,
getXmlNodeInt,
getXmlNodeText,
KalturaClientPlugin,
KalturaEnumsFactory,
KalturaObjectBase,
KalturaObjectFactory,
KalturaParams,
KalturaServiceBase,
)
########## enu... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_ps.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/ModelTool-0.8.5.tar.gz/ModelTool-0.8.5/modeltool/command.py | import modeltool
from modeltool.lambda_creator import LambdaCreator
from modeltool.lambda_deployer import LambdaDeployer
import click
import boto3
import logging
import sys
import os
import json
default_stage = 'dev'
fresh_notes = '''A skeleton of the new lambda, {}, has been created.
In {}/{}/config you will find a ... | PypiClean |
/NeuroRuler-1.7.tar.gz/NeuroRuler-1.7/README.md | # NeuroRuler



> A program that calculat... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/methods/messages/__init__.py |
from .copy_media_group import CopyMediaGroup
from .copy_message import CopyMessage
from .delete_messages import DeleteMessages
from .download_media import DownloadMedia
from .edit_inline_caption import EditInlineCaption
from .edit_inline_media import EditInlineMedia
from .edit_inline_reply_markup import EditInlineRepl... | PypiClean |
/dirtrav-1.0.0.tar.gz/dirtrav-1.0.0/docs/deploying/apache-httpd.rst | Apache httpd
============
`Apache httpd`_ is a fast, production level HTTP server. When serving
your application with one of the WSGI servers listed in :doc:`index`, it
is often good or necessary to put a dedicated HTTP server in front of
it. This "reverse proxy" can handle incoming requests, TLS, and other
security a... | PypiClean |
/MezzanineFor1.7-3.1.10.tar.gz/MezzanineFor1.7-3.1.10/mezzanine/utils/device.py | from __future__ import unicode_literals
def device_from_request(request):
"""
Determine's the device name from the request by first looking for an
overridding cookie, and if not found then matching the user agent.
Used at both the template level for choosing the template to load and
also at the ca... | PypiClean |
/HfCh5Levi-1.0.4.tar.gz/HfCh5Levi-1.0.4/HfCh5Levi.py | import os;
os.getcwd()
os.chdir('/Users/AnQiuPing/Documents/Python/HfCh5Levi')
julieList = []
jamesList = []
sarahList = []
mikeyList = []
'''four new lists for storing the ordered and uniformed lists from original lists'''
sanitizedJames = []
sanitizedJulie = []
sanitizedMikey = []
sanitizedSarah = []
'''new lis... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/gui/vtc/request_list.py |
from electrum_vtc.i18n import _
from electrum_vtc.util import block_explorer_URL, format_satoshis, format_time, age
from electrum_vtc.plugins import run_hook
from electrum_vtc.paymentrequest import PR_UNPAID, PR_PAID, PR_UNKNOWN, PR_EXPIRED
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from util import MyTreeW... | PypiClean |
/KratosCoSimulationApplication-9.4-cp39-cp39-win_amd64.whl/KratosMultiphysics/CoSimulationApplication/solver_wrappers/external/flower_wrapper.py | import KratosMultiphysics as KM
# Importing the base class
from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_solver_wrapper import CoSimulationSolverWrapper
# Other imports
from KratosMultiphysics.CoSimulationApplication.utilities import model_part_utilities
from KratosMultiphysics.CoSimulati... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/umd/locale/cs-CZ.js | (function (global, factory) {
if (typeof define === "function" && define.amd) {
define('element/locale/cs-CZ', ['module', 'exports'], factory);
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
facto... | PypiClean |
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/docs/deployment.rst | ==========
Deployment
==========
Deployment of a Mezzanine site to production is mostly identical to
deploying a regular Django site. For serving static content, Mezzanine
makes full use of Django's ``staticfiles`` app. For more information,
see the Django docs for
`deployment <https://docs.djangoproject.com/en/dev/ho... | PypiClean |
/Avalara.SDK-2.4.29.tar.gz/Avalara.SDK-2.4.29/Avalara/SDK/exceptions.py | class OpenApiException(Exception):
"""The base exception class for all OpenAPIExceptions"""
class ApiTypeError(OpenApiException, TypeError):
def __init__(self, msg, path_to_item=None, valid_classes=None,
key_type=None):
""" Raises an exception for TypeErrors
Args:
... | PypiClean |
/Biomatters_Azimuth-0.2.6-py3-none-any.whl/azimuth/models/baselines.py | import numpy as np
import sklearn
from sklearn.svm import LinearSVC
from sklearn.linear_model import LogisticRegression
import sklearn.linear_model
import pandas
def mean_on_fold(feature_sets, train, test, y, y_all, inputs, dim, dimsum, learn_options):
return np.ones((test.sum(), 1))*y[train].mean(), None
def ra... | PypiClean |
/Flask_JSONRPC-2.2.2-py3-none-any.whl/flask_jsonrpc/contrib/browse/static/js/libs/angular/angular-sanitize.min.js | (function(m,g,n){'use strict';function h(a){var d={};a=a.split(",");var c;for(c=0;c<a.length;c++)d[a[c]]=!0;return d}function D(a,d){function c(a,b,c,f){b=g.lowercase(b);if(r[b])for(;e.last()&&s[e.last()];)k("",e.last());t[b]&&e.last()==b&&k("",b);(f=u[b]||!!f)||e.push(b);var l={};c.replace(E,function(a,b,d,c,e){l[b]=p... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/security/oauth2_validators.py | from oauth2_provider.settings import oauth2_settings
from oauth2_provider.oauth2_validators import OAuth2Validator
import json
import base64
import hashlib
import logging
from datetime import datetime, timedelta
from django.utils import dateformat, timezone
from jwcrypto import jwk, jwt
log = logging.getLogger(__n... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/support/_test/node.py | #from logging import basicConfig, DEBUG, INFO
from unittest import TestCase
from lepl import Delayed, Digit, Any, Node, make_error, node_throw, Or, Space, \
AnyBut, Eos
from lepl.support.graph import order, PREORDER, POSTORDER, LEAF
from lepl._test.base import assert_str
# pylint: disable-msg=C0103, C0111, C0301... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/person/pt_BR/__init__.py | from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_female = (
"{{first_name_female}} {{last_name}}",
"{{first_name_female}} {{last_name}}",
"{{first_name_female}} {{last_name}}",
"{{first_name_female}} {{last_name}}",
"{{first_name_female}} {{... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/mode/soy/soy.js |
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod);
else // Plain brow... | PypiClean |
/INF367-chen-1.1.1.zip/INF367-chen-1.1.1/src/persistent_homology.py | from itertools import combinations
import numpy as np
import pandas
import plotly.express as px
import plotly.graph_objects as go
import torch
from plotly.subplots import make_subplots
from scipy.signal import convolve2d
from sklearn.datasets import make_moons
from sklearn.metrics import euclidean_distances
from sklea... | PypiClean |
/D47crunch-2.0.3.tar.gz/D47crunch-2.0.3/docs/tutorial.md | ## 1. Tutorial
### 1.1 Installation
The easy option is to use `pip`; open a shell terminal and simply type:
```
python -m pip install D47crunch
```
For those wishing to experiment with the bleeding-edge development version, this can be done through the following steps:
1. Download the `dev` branch source code [her... | PypiClean |
/Mopidy-3.4.1-py3-none-any.whl/mopidy/models/fields.py | import sys
class Field:
"""
Base field for use in
:class:`~mopidy.models.immutable.ValidatedImmutableObject`. These fields
are responsible for type checking and other data sanitation in our models.
For simplicity fields use the Python descriptor protocol to store the
values in the instance d... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/utils/unittest/case.py |
import sys
import difflib
import pprint
import re
import unittest
import warnings
from django.utils.unittest import result
from django.utils.unittest.util import\
safe_repr, safe_str, strclass,\
unorderable_list_difference
from django.utils.unittest.compatibility import wraps
__unittest = True
DIFF_OMITTE... | PypiClean |
/IETK-Ret-0.1.1.tar.gz/IETK-Ret-0.1.1/ietk/methods/illuminate_sharpen.py | import numpy as np
import cv2
import scipy as sp
from dehaze import get_dark_channel
from ietk import methods
from ietk import util
def reshape_A(A, I_shape):
if np.shape(A) == (): # scalar
A = np.reshape(A, (1,1,1))
elif np.shape(A) == (3,): # rgb pixel color
A = np.reshape(A, (1,1,3))
... | PypiClean |
/Distribution_Waed-0.1.tar.gz/Distribution_Waed-0.1/Distribution_Waed/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 |
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/structure/networks/mdrnn.py | __author__ = 'Justin S Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
import operator
import scipy
try:
from arac.pybrainbridge import _FeedForwardNetwork #@UnresolvedImport
except:
_FeedForwardNetwork = object
from pybrain.structure.modules.mdrnnlayer import MdrnnLayer
from pybrain.structure import... | PypiClean |
/DNBC4tools-2.1.0.tar.gz/DNBC4tools-2.1.0/dnbc4tools/rna/run.py | import os,collections
import argparse
from dnbc4tools.tools.utils import str_mkdir,judgeFilexits,change_path,read_json,logging_call
from dnbc4tools.__init__ import __root_dir__
class Runpipe:
def __init__(self, args):
self.name = args.name
self.cDNAr1 = args.cDNAfastq1
self.cDNAr2 = args.cD... | PypiClean |
/Bubot_AdminPanel-0.0.2-py3-none-any.whl/BubotObj/OcfDevice/subtype/AdminPanel/static/ui/js/chunk-194d1552.b563dbf4.js | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-194d1552"],{"0fd9":function(t,e,n){"use strict";n("99af"),n("4160"),n("caad"),n("13d5"),n("4ec9"),n("b64b"),n("d3b7"),n("ac1f"),n("2532"),n("3ca3"),n("5319"),n("159b"),n("ddb0");var a=n("ade3"),i=n("5530"),s=(n("4b85"),n("2b0e")),r=n("d9f7"),o=n("80d2"),... | PypiClean |
/Magnesium-0.1.1.tar.gz/Magnesium-0.1.1/src/magnesium/prefab/list_of_dicts_prefab.py | from lxml import etree
from .base_prefab import BasePrefab
from magnesium.query_marker import DoubleCurlyQueryMarkerStrategy
from magnesium.path_processor import SimplePathProcessor
from magnesium.path_interpreter import XPathInterpreter
from magnesium.mapping import SimpleMapping
from magnesium.pipeline import (
... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/company/pt_BR/__init__.py | from typing import List
from .. import Provider as CompanyProvider
def company_id_checksum(digits: List[int]) -> List[int]:
digits = list(digits)
weights = 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2
dv = sum(w * d for w, d in zip(weights[1:], digits))
dv = (11 - dv) % 11
dv = 0 if dv >= 10 else dv
... | PypiClean |
/Cheetah-2.4.4.tar.gz/Cheetah-2.4.4/cheetah/Tests/Regressions.py |
import Cheetah.NameMapper
import Cheetah.Template
import sys
import unittest
majorVer, minorVer = sys.version_info[0], sys.version_info[1]
versionTuple = (majorVer, minorVer)
def isPython23():
''' Python 2.3 is still supported by Cheetah, but doesn't support decorators '''
return majorVer == 2 and minorVe... | PypiClean |
/ApplicationClientServer_server-0.1-py3-none-any.whl/common/metaclasses.py | import dis
from pprint import pprint
# Метакласс для проверки соответствия сервера:
class ServerMaker(type):
def __init__(cls, clsname, bases, clsdict):
"""
:param clsname: - экземпляр метакласса - Server
:param bases: кортеж базовых классов - ()
:param clsdict: словарь атрибутов ... | PypiClean |
/GSAS-II-WONDER_linux-1.0.1.tar.gz/GSAS-II-WONDER_linux-1.0.1/GSAS-II-WONDER/imports/G2img_GE.py | from __future__ import division, print_function
import os
import numpy as np
import GSASIIobj as G2obj
import GSASIIpath
GSASIIpath.SetVersionNumber("$Revision: 4112 $")
class GE_ReaderClass(G2obj.ImportImage):
'''Routine to read a GE image, typically from APS Sector 1.
The image files may be of fo... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/43377.e8dcf533195e606a1451.min.js | (self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[43377],{43377:function(s){s.exports=function(s){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+s.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas a... | PypiClean |
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/personal_data/positions/types/linear_position.py | import decimal
import octobot_trading.constants as constants
import octobot_trading.enums as enums
import octobot_trading.personal_data.positions.position as position_class
class LinearPosition(position_class.Position):
def update_value(self):
"""
Notional value = CONTRACT_QUANTITY * MARK_PRICE
... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Simulator/Channels/DebugChannel.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/Anemone-0.0.1.tar.gz/Anemone-0.0.1/anemone/reporter.py | import zmq
import threading
from Queue import Queue, Empty
class Reporter(object):
def __init__(self, program_name, analysis_name):
"""
The only anemone class to use for the data generating program
The analysis name should be the name of the input file
or some other easily recogniza... | PypiClean |
/LTEpy-1.0.4.tar.gz/LTEpy-1.0.4/docs/notebooks/boltzmann_factor_demo.ipynb | # Boltzmann Factor Demo
```
import numpy as np
import matplotlib.cm as cm
import sys
from LTEpy import lte, atom, plot
from LTEpy.constants import EVOLT
```
### Make a hydrogen atom
```
hydrogen = atom.Hydrogen()
print(f"{hydrogen.levels=}")
print(f"{hydrogen.energy/EVOLT=}eV\n{hydrogen.gdegen=}")
```
### Calculat... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/docs/releasenotes/0.6.10.rst | ============================
Djblets 0.6.10 Release Notes
============================
**Release date**: August 20, 2011
djblets.datagrid
================
* Log failed attempts at finding cell templates, in order to aid
debugging.
djblets.feedview
================
* Don't fail with an uncaught exception if loa... | PypiClean |
/CsuPTMD-1.0.12.tar.gz/CsuPTMD-1.0.12/PTMD/maskrcnn_benchmark/data/samplers/grouped_batch_sampler.py | import itertools
import torch
from torch.utils.data.sampler import BatchSampler
from torch.utils.data.sampler import Sampler
class GroupedBatchSampler(BatchSampler):
"""
Wraps another sampler to yield a mini-batch of indices.
It enforces that elements from the same group should appear in groups of batch_... | PypiClean |
/Loaderio-1.0.2.tar.gz/Loaderio-1.0.2/README.md | Loaderio
===========================================
Python wrapper for loader.io api v2
## Installation
```pip install loaderio```
## How to use
Go to go [Loaderio][] for more details on api resources.
## Resources
### Applications
```
from loaderio.Loaderio import Loaderio
loader = Loaderio('API_KEY')
load... | PypiClean |
/NeodroidVision-0.3.0-py36-none-any.whl/neodroidvision/regression/vae/architectures/vanilla_vae.py |
__author__ = "Christian Heider Nielsen"
__doc__ = """ description """
import torch
import torch.utils.data
from draugr.torch_utilities import ReductionMethodEnum
from torch import nn
from torch.nn.functional import binary_cross_entropy
from warg import Number
from neodroidvision.regression.vae.architectures.vae impo... | PypiClean |
/NSoL-0.1.14.tar.gz/NSoL-0.1.14/nsol/linear_operators.py |
# Import libraries
import numpy as np
import scipy.ndimage
from abc import ABCMeta, abstractmethod
import nsol.kernels as Kernels
class LinearOperators(object):
__metaclass__ = ABCMeta
##
# { constructor_description }
# \date 2017-07-23 16:42:57+0100
#
# \param self The obj... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_bs-cyrl-ba.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/BALISTICA-1.0.0.tar.gz/BALISTICA-1.0.0/balistica/GUI/AnalyticV.py | import numpy as np
import matplotlib
import tkinter as tk
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0})
from matplotlib.figure import Figure
from balistica.PhysicsEngine.AnalyticVPhysicsHan... | PypiClean |
/MADAP-1.1.0.tar.gz/MADAP-1.1.0/README.rst | .. image:: logo.png
:align: center
MADAP
~~~~~
Modular and Autonomous Data Analysis Platform (MADAP) is a
well-documented python package which can be used for electrochmeical
data analysis.
This package consists of 3 main classes for analysis:
- Voltammetry
- Impedance spectroscopy
- Arrhenius
This package ... | PypiClean |
/ImgAnn-0.8.1-py3-none-any.whl/imgann/operators/imgdata.py |
import os
import sys
import random
import logging
import pandas as pd
# set the logger
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
""":cvar
(self.dataset) image_df attributes:
- image_id : int
- name : str
- folder : str
- path : str (separated by / )
... | PypiClean |
/HTSQL-2.3.3.tar.gz/HTSQL-2.3.3/doc/html/searchindex.js | Search.setIndex({objects:{"htsql.core.syn.grammar.SyntaxGrammar":{add_rule:[10,1,1,""]},"htsql.core.util.Clonable":{clone_to:[10,1,1,""],clone:[10,1,1,""]},"htsql.HTSQL":{"__call__":[15,1,1,""],produce:[15,1,1,""]},"htsql.core.syn.parse":{parse:[10,3,1,""],prepare_parse:[10,3,1,""]},"htsql.core.util":{omapof:[10,2,1,""... | PypiClean |
/Lmgeo-1.1.0.tar.gz/Lmgeo-1.1.0/lmgeo/formats/asciigrid.py | from .const import Const, constants as const
import os.path
import array
import pycrs
from .raster import Raster
from .gridenvelope2d import GridEnvelope2D;
from warnings import warn
__author__ = "Steven B. Hoek"
class AsciiGrid(Raster, GridEnvelope2D):
"""A raster represented by an ASCII file, with extension 'as... | PypiClean |
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/threads/serializers/thread.py | from math import ceil
from django.urls import reverse
from rest_framework import serializers
from ...categories.serializers import CategorySerializer
from ...core.serializers import MutableFields
from ...notifications.threads import ThreadNotifications
from ..models import Thread
from .poll import PollSerializer
from... | PypiClean |
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/common/memory/exclude/wtf/data_structures/Action_Balanced_Replay_Buffer.py | import random
from collections import deque, namedtuple
import numpy as np
import torch
from .Replay_Buffer import Replay_Buffer
class Action_Balanced_Replay_Buffer(Replay_Buffer):
"""Replay buffer that provides sample of experiences that have an equal number of each action being
conducted"""
def __init__(se... | PypiClean |
/Notable-0.4.2.tar.gz/Notable-0.4.2/notable/static/lib/ace/src-min/theme-eclipse.js | define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse {background-colo... | PypiClean |
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/docs/usage/vcs_notes.rst | .. _vcs_notes:
===================================
Version control systems usage notes
===================================
.. _importing:
Importing existing repositories
-------------------------------
There are two main methods to import repositories in Kallithea: via the web
interface or via the filesystem. If y... | PypiClean |
/Mage2Gen-2.3.3.tar.gz/Mage2Gen-2.3.3/mage2gen/snippets/eaventityattribute.py | import os, locale
from .. import Module, Phpclass, Phpmethod, Xmlnode, StaticFile, Snippet, SnippetParam
from ..utils import upperfirst
class EavEntityAttributeSnippet(Snippet):
snippet_label = 'EAV Attribute (custom)'
FRONTEND_INPUT_TYPE = [
("text","Text Field"),
("textarea","Text Area"),
("date","Date"),
... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/az.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['az']={"editor":"Mətn Redaktoru","editorPanel":"Mətn Redaktorun Paneli","common":{"editorHelp":"Yardım üçün ALT 0 düymələrini basın","browseServer":"Fayların siy... | PypiClean |
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/core/layers.py | import copy
import functools
import sys
from typing import Any, Callable, Dict, List, Optional, Type, Union
import torch
from torch import nn
from BIT_DL.pytorch.core import cell_wrappers as wrappers
from BIT_DL.pytorch.core.regularizers import L1L2, Regularizer
from BIT_DL.pytorch.hyperparams import HParams
from BIT... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.