id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/mmdet/models/detectors/panoptic_two_stage_segmentor.py | import mmcv
import numpy as np
import torch
from mmdet.core import INSTANCE_OFFSET, bbox2roi, multiclass_nms
from mmdet.core.visualization import imshow_det_bboxes
from ..builder import DETECTORS, build_head
from ..roi_heads.mask_heads.fcn_mask_head import _do_paste_mask
from .two_stage import TwoStageDetector
@DETE... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/jquery/ui/jquery.ui.core.js | (function( $, undefined ) {
// prevent duplicate loading
// this is only a problem because we proxy existing functions
// and we don't want to double proxy them
$.ui = $.ui || {};
if ( $.ui.version ) {
return;
}
$.extend( $.ui, {
version: "1.8.10",
keyCode: {
ALT: 18,
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 1... | PypiClean |
/ARGs_OAP-2.3.2.tar.gz/ARGs_OAP-2.3.2/ARGs_OAP/bin/bbmap/kmercoverage.sh |
usage(){
echo "
Written by Brian Bushnell
Last modified May 23, 2014
*** DEPRECATED: This should still work but is no longer maintained. ***
Description: Annotates reads with their kmer depth.
Usage: kmercoverage in=<input> out=<read output> hist=<histogram output>
Input parameters:
in2=null Sec... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/datastructures/halfface/halfface.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from random import choice, sample
from compas.datastructures.datastructure import Datastructure
from compas.datastructures.attributes import VertexAttributeView
from compas.datastructures.attributes import Edg... | PypiClean |
/Clone-ChatGPT-1.3.0.tar.gz/Clone-ChatGPT-1.3.0/src/pandora/flask/static/_next/static/chunks/174-bd28069f281ef76f.js | (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[174],{63561:function(e,t){"use strict";t.Z=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}},68561:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(63561).Z... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/address/sk_SK/__init__.py | from .. import Provider as AddressProvider
class Provider(AddressProvider):
city_formats = ("{{city_name}}",)
street_name_formats = ("{{street_name}}",)
street_address_formats = ("{{street_name}} {{building_number}}",)
address_formats = ("{{street_address}}\n{{postcode}} {{city}}",)
building_num... | PypiClean |
/MAnorm-1.3.0.tar.gz/MAnorm-1.3.0/manorm/region/__init__.py | import logging
import os
from manorm.region.parsers import get_region_parser
from manorm.stats import xy_to_ma, ma_to_xy, manorm_p
logger = logging.getLogger(__name__)
REGION_FORMATS = ['bed', 'bed3-summit', 'macs', 'macs2', 'narrowpeak',
'broadpeak']
class GenomicRegion:
"""Class for a genom... | PypiClean |
/BESST-2.2.8.tar.gz/BESST-2.2.8/scripts/reads_to_ctg_map.py | import argparse
import os
import shutil
import subprocess
import sys
import tempfile
from datetime import datetime
from sys import stdout
import pysam
import re
##
# Converts a sam file to a bam file using pysam.
#
# @param sam_path Path of the .sam file.
# @param bam_path Path of the resulting .bam file.
#
def sam... | PypiClean |
/KPyGithub-1.32a1.tar.gz/KPyGithub-1.32a1/github/Hook.py |
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/drawing/manager/Stencil.js | if(!dojo._hasResource["dojox.drawing.manager.Stencil"]){
dojo._hasResource["dojox.drawing.manager.Stencil"]=true;
dojo.provide("dojox.drawing.manager.Stencil");
(function(){
var _1,_2;
dojox.drawing.manager.Stencil=dojox.drawing.util.oo.declare(function(_3){
_1=_3.surface;
this.canvas=_3.canvas;
this.defaults=dojox.dra... | PypiClean |
/CSG_test-0.1.2.tar.gz/CSG_test-0.1.2/clientAPI/mixin.py | from types import ModuleType
from typing import (Any, Dict, Optional, Type, Union)
import clientAPI.base as base
from .client import CSGList, CSGenome
import clientAPI.utils as exc
__all__ = [
"GetMixin",
"GetWithoutIdMixin",
"RefreshMixin",
"ListMixin",
"RetrieveMixin",
"CreateMixin",
"U... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/interfaces/jobs/scheduler.py | import random
import time
import datetime as dt
import threading
import queue
from mindsdb.utilities.config import Config
from mindsdb.utilities.log import initialize_log
from mindsdb.utilities import log
from mindsdb.interfaces.storage import db
from mindsdb.interfaces.jobs.jobs_controller import JobsExecutor
log... | PypiClean |
/EasyMenusBar-0.3.5.tar.gz/EasyMenusBar-0.3.5/menusbar/core/MenusBar.py |
from PySide2.QtWidgets import QWidget, QFileSystemModel, QTreeView, QAction, QMenu, QVBoxLayout, QAbstractItemView, \
QShortcut
from PySide2 import QtCore, QtGui
from PySide2.QtCore import QMargins, QFileInfo, QUrl, Qt
from PySide2.QtGui import QMouseEvent, QDesktopServices, QKeySequence
from menusbar.core.FileUti... | PypiClean |
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/doc/common_doc.py | import importlib
import os.path as osp
import pkgutil
import re
from os import getenv, listdir
from types import ModuleType
from typing import Callable
from mathics import builtin, settings
from mathics.builtin.base import check_requires_list
from mathics.core.evaluation import Message, Print
from mathics.core.util im... | PypiClean |
/BlueWhale3-Recommendation-0.1.3.tar.gz/BlueWhale3-Recommendation-0.1.3/doc/source/widgets/baselines.rst | Baselines
=========
.. figure:: ../resources/icons/user-item-baseline.svg
:width: 64pt
This widget includes four basic baseline models: Global average, User average,
Item average and User-Item baseline.
Signals
-------
**Inputs**:
- **Data**
Data set.
- **Preprocessor**
Preprocessed data.
**Outputs... | PypiClean |
/IPFX-1.0.8.tar.gz/IPFX-1.0.8/ipfx/attach_metadata/sink/dandi_yaml_sink.py | from typing import (
List, Dict, Any, Set, Optional
)
import yaml
from ipfx.attach_metadata.sink.metadata_sink import (
MetadataSink, OneOrMany
)
class DandiYamlSink(MetadataSink):
""" Sink specialized for writing data to a DANDI-compatible YAML file.
"""
@property
def targets(self) -> List... | PypiClean |
/Alpha-Mind-0.3.1.tar.gz/Alpha-Mind-0.3.1/alphamind/analysis/quantileanalysis.py | from typing import Optional
import numpy as np
import pandas as pd
from alphamind.data.processing import factor_processing
from alphamind.data.quantile import quantile
from alphamind.data.standardize import standardize
from alphamind.data.winsorize import winsorize_normal
from alphamind.utilities import agg_mean
de... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/sphinx/search/non-minified-js/porter-stemmer.js | var JSX = {};
(function (JSX) {
/**
* extends the class
*/
function $__jsx_extend(derivations, base) {
var ctor = function () {};
ctor.prototype = base.prototype;
var proto = new ctor();
for (var i in derivations) {
derivations[i].prototype = proto;
}
}
/**
* copies the implementations from source interface ... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/static/loader-bootstrap.js | var loading = [];
// Remove some weird things from location hash
if (
window.location.hash &&
(window.location.hash.indexOf('"') > -1 ||
window.location.hash.indexOf("=") > -1)
) {
window.location.hash = "";
}
// Loading indicator handler
function increaseLoading(sel) {
if (!(sel in loading)) {
loadin... | PypiClean |
/Hikka_TL-1.24.14-py3-none-any.whl/telethon/client/users.py | import asyncio
import datetime
import itertools
import time
import typing
from .. import errors, helpers, utils, hints
from ..errors import MultiError, RPCError
from ..helpers import retry_range
from ..tl import TLRequest, types, functions
_NOT_A_REQUEST = lambda: TypeError("You can only invoke requests, not types!")... | PypiClean |
/ECCArithmetic-1.0.0.tar.gz/ECCArithmetic-1.0.0/README.md | # ECCArithmetic
## Installation
```
pip install ECCArithmetic
```
## Generate the Curve
```
from ECCArithmetic.ec import *
Curve = EC(0, 5, 2, 23981)
```
## PickGenerator
```python
from ECCArithmetic.ec import *
Curve = EC(0, 5, 2, 23981)
G = Curve.pickGenerator()
```
## PickPoint
```python
from ECCArithmetic.e... | PypiClean |
/Box2D-2.3.2.tar.gz/Box2D-2.3.2/examples/liquid.py |
from math import sqrt
from .framework import (Framework, Keys, main)
from Box2D import (b2CircleShape, b2FixtureDef, b2PolygonShape, b2Random,
b2Vec2, b2_epsilon)
# ***** NOTE *****
# ***** NOTE *****
# This example does not appear to be working currently...
# It was ported from the JBox2D (Java) ... | PypiClean |
/MappedAPI-1.0.0.tar.gz/MappedAPI-1.0.0/README.md | ## Mapped API ##
[](https://travis-ci.com/venuebook/mappedapi)
A python library for an easily mapped RESTful API.
**Installation:**
(unless performing a system wide install, it's recommended to install inside of a virtualenv)
```bash
# Ins... | PypiClean |
/Flask-Monitoring-1.1.2.tar.gz/Flask-Monitoring-1.1.2/flask_monitoringdashboard/core/config/parser.py | import ast
import os
from flask_monitoringdashboard.core.logger import log
def parse_version(parser, header, version):
"""
Parse the version given in the config-file.
If both GIT and VERSION are used, the GIT argument is used.
:param parser: the parser to be used for parsing
:param header: name o... | PypiClean |
/Crack-O-Matic-0.2.1.tar.gz/Crack-O-Matic-0.2.1/crackomatic/models.py | from contextlib import contextmanager
from sqlalchemy import func, create_engine, Column, Integer, String, Boolean, \
DateTime, Text, ForeignKey, Float
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship, scoped_session
Base = declarative_base()
engine = N... | PypiClean |
/KratosRomApplication-9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/RomApplication/empirical_cubature_method.py | import numpy as np
try:
from matplotlib import pyplot as plt
missing_matplotlib = False
except ImportError as e:
missing_matplotlib = True
class EmpiricalCubatureMethod():
"""
This class selects a subset of elements and corresponding positive weights necessary for the construction of a hyper-red... | PypiClean |
/MyoSuite-2.0.1-py3-none-any.whl/myosuite/utils/paths_utils.py | import numpy as np
import os
import glob
import pickle
import h5py
import skvideo.io
from PIL import Image
import click
from myosuite.utils.dict_utils import flatten_dict, dict_numpify
import json
# Useful to check the horizon for teleOp / Hardware experiments
def plot_horizon(paths, env, fileName_prefix=None):
i... | PypiClean |
/Flask-WebTest-0.1.3.tar.gz/Flask-WebTest-0.1.3/README.rst | Flask-WebTest
=============
.. image:: https://dl.circleci.com/status-badge/img/gh/level12/flask-webtest/tree/master.svg?style=svg
:target: https://dl.circleci.com/status-badge/redirect/gh/level12/flask-webtest/tree/master
Flask-WebTest provides a set of utilities to ease testing Flask applications with WebTe... | PypiClean |
/InformixDB-2.5.tar.gz/InformixDB-2.5/README | INTRODUCTION
============
This is informixdb 2.5, an Informix implementation of the Python
Database API. This release implements version 2.0 of the DB-API:
http://www.python.org/topics/database/DatabaseAPI-2.0.html
The module consists of two components:
- `_informixdb', a Python C extension that interfaces with ... | PypiClean |
/Newsroom-1.0-py3-none-any.whl/newsroom/push.py | import io
import hmac
import flask
import logging
import superdesk
from copy import copy
from PIL import Image, ImageEnhance
from flask import current_app as app
from superdesk.utc import utcnow
from superdesk.text_utils import get_word_count
from newsroom.notifications import push_notification
from newsroom.topics.to... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/lib/migrate.py | """ contains the hsm migration handler"""
from Cryptodome.Protocol.KDF import PBKDF2
import hmac
import binascii
import random # for test id genretator using random.choice
import os
from hashlib import sha256
from Cryptodome.Cipher import AES
from linotp.model import Token as model_token
from linotp.model import... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/cmorizers/data/formatters/datasets/woa.py | import logging
import os
from warnings import catch_warnings, filterwarnings
import iris
from cf_units import Unit
from esmvaltool.cmorizers.data.utilities import (
constant_metadata,
fix_coords,
fix_var_metadata,
save_variable,
set_global_atts,
)
logger = logging.getLogger(__name__)
def _fix_d... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/tailwindcss/lib/cli/init/index.js | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "init", {
enumerable: true,
get: ()=>init
});
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
function _interopReq... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/ffc/quadrature/product.py | "This file implements a class to represent a product."
# Copyright (C) 2009-2010 Kristian B. Oelgaard
#
# This file is part of FFC.
#
# FFC 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 versio... | PypiClean |
/HADeploy-0.6.1.tar.gz/HADeploy-0.6.1/lib/hadeploy/plugins/kafka/code.py |
import logging
import hadeploy.core.misc as misc
import os
import glob
from hadeploy.core.templator import Templator
from hadeploy.core.plugin import Plugin
from hadeploy.core.const import SRC,DATA,DEFAULT_TOOLS_FOLDER,SCOPE_KAFKA,ACTION_DEPLOY,ACTION_REMOVE
logger = logging.getLogger("hadeploy.plugins.kafka")
HELPE... | PypiClean |
/BLECryptracer_BLEMAP-0.0.7.tar.gz/BLECryptracer_BLEMAP-0.0.7/README.md | # BLECryptracer #
These scripts require Python v3+ and have been tested with Androguard v3.3.5. These (and all dependencies) should be installed on your system.
In order to install dependencies you can
```
pip install -r requirements.txt
```
In order to analyse an APK you will need to type the following
```
python... | PypiClean |
/dyson-1.1.2.tar.gz/dyson-1.1.2/docs/variables.md | Variables
====================
There are four possible ways to specify variables within your tests
and are overriden in this order:
1. `apps/default.yml`
2. `apps/<application>.yml`
3. `tests/<test>/vars/main.yml`
4. `-e "my_variable=something another_variable=something_else"`
## Accessing Variables
From the [examp... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/layout/ScrollPane.js | if(!dojo._hasResource["dojox.layout.ScrollPane"]){
dojo._hasResource["dojox.layout.ScrollPane"]=true;
dojo.provide("dojox.layout.ScrollPane");
dojo.experimental("dojox.layout.ScrollPane");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit._Templated");
dojo.declare("dojox.layout.ScrollPane",[dijit.layout.Co... | PypiClean |
/Abhilash1_optimizers-0.1.tar.gz/Abhilash1_optimizers-0.1/Abhilash1_optimizers/RMSprop.py | #RMSProp
import math
import numpy as np
import Abhilash1_optimizers.Activation as Activation
import Abhilash1_optimizers.hyperparameters as hyperparameters
import Abhilash1_optimizers.Moment_Initializer as Moment_Initializer
#RMSprop algorithm with momentum on rescaled gradient
class RMSPROP():
def __init__(alpha... | PypiClean |
/LibRPG-0.4.zip/LibRPG-0.4/librpg/map.py | import csv
import operator
import pygame
from librpg.mapobject import *
from librpg.mapview import MapView
from librpg.sound import MapMusic
from librpg.util import *
from librpg.image import *
from librpg.tile import *
from librpg.config import *
from librpg.locals import *
from librpg.movement import Step
from libr... | PypiClean |
/3to2_py3k-1.0.tar.gz/3to2_py3k-1.0/lib3to2/fixes/fix_metaclass.py | from lib2to3 import fixer_base
from ..fixer_util import Name, syms, Node, Leaf, Newline, find_root, indentation, suitify
from lib2to3.pygram import token
def has_metaclass(parent):
results = None
for node in parent.children:
kids = node.children
if node.type == syms.argument:
if kid... | PypiClean |
/Canto-0.9.8.tar.gz/Canto-0.9.8/canto_next/plugins.py |
#Canto - RSS reader backend
# Copyright (C) 2016 Jack Miller <jack@codezen.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
import traceback
import logging
import sys
... | PypiClean |
/DeepCell-CPU-0.12.9.tar.gz/DeepCell-CPU-0.12.9/deepcell/image_generators/semantic.py | import os
import numpy as np
from skimage.transform import rescale, resize
from tensorflow.keras import backend as K
from tensorflow.keras.preprocessing.image import array_to_img
from tensorflow.keras.preprocessing.image import Iterator
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorfl... | PypiClean |
/BurnerOnFire-0.1.tar.gz/BurnerOnFire-0.1/docs/build/html/_static/doctools.js | if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function(... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/nodes/StatementNodes.py | from .NodeBases import StatementBase, StatementChildHavingBase
def checkStatements(value):
"""Check that statements list value property.
Must not be None, must not contain None, and of course only statements,
may be empty.
"""
assert value is not None
assert None not in value
for statem... | PypiClean |
/ESMValCore-2.9.0rc1.tar.gz/ESMValCore-2.9.0rc1/esmvalcore/cmor/_fixes/emac/emac.py | import logging
from shutil import copyfile
import dask.array as da
import iris.analysis
import iris.util
from iris import NameConstraint
from iris.aux_factory import HybridPressureFactory
from iris.cube import CubeList
from netCDF4 import Dataset
from scipy import constants
from ..shared import add_aux_coords_from_cu... | PypiClean |
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/plugins/corewizard/__init__.py | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
from flask_babel import gettext
import octoprint.plugin
from .subwizards import Subwizards
class CoreWizardPlugin(
octo... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/strategies/qlearner.py | from collections import OrderedDict
from typing import Dict, Union
from axelrod.action import Action, actions_to_str
from axelrod.player import Player
Score = Union[int, float]
C, D = Action.C, Action.D
class RiskyQLearner(Player):
"""A player who learns the best strategies through the q-learning
algorithm... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/__test__/Query_Filter.py |
from __future__ import print_function
def show (q) :
return sorted (str (x) for x in q)
_composite = r"""
>>> scope = Scaffold.scope (%(p1)s, %(n1)s) # doctest:+ELLIPSIS
Creating new scope MOMT__...
>>> EVT = scope.EVT
>>> SWP = scope.SWP
>>> p1 = SWP.Page ("event-1-text", te... | PypiClean |
/Grammaticomastix-0.0.1rc2-py3-none-any.whl/grammaticomastix/dchars/languages/bod/transliterations/bodsan/bodsan_symbols.py | from dchars.utilities.dicttools import invertdict
#
# * CAVEAT ! If you modify these dictionaries, don't forget to modify their
# corresponding symbols' dictionaries in symbols.py !
#
# * CAVEAT ! No duplicate value allowed in these dictionaries !
#
CONSONANTS = {
'K' : chr(0x091... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/cmorizers/data/downloaders/datasets/cds_satellite_soil_moisture.py |
import calendar
import datetime
from dateutil import relativedelta
from esmvaltool.cmorizers.data.downloaders.cds import CDSDownloader
from esmvaltool.cmorizers.data.utilities import unpack_files_in_folder
def download_dataset(config, dataset, dataset_info, start_date, end_date,
overwrite):
... | PypiClean |
/BinTut-0.3.3.tar.gz/BinTut-0.3.3/bintut/courses/init.py | from __future__ import division, absolute_import, print_function
from logging import (
getLogger, Formatter, DEBUG, INFO, WARNING, ERROR, CRITICAL)
from colorama import Fore, Back, Style
class LoggingMixIn(object):
@property
def logger(self):
return getLogger(self.__class__.__name__)
# TODO: Wr... | PypiClean |
/Acolyte-0.0.1.tar.gz/Acolyte-0.0.1/acolyte/testing/core/user_service.py | from acolyte.testing import EasemobFlowTestCase
from acolyte.core.storage.user import UserDAO
class UserServiceTestCase(EasemobFlowTestCase):
def setUp(self):
self._user_service = self._("UserService")
self._new_user_id_collector = [] # 用于收集测试所产生的新用户ID,在teardown中集中处理
def testLogin(self):
... | PypiClean |
/Flask-State-1.1.4.tar.gz/Flask-State-1.1.4/src/flask_state/utils/logger.py | import copy
import logging
from logging import config
from flask import app
from ..utils.constants import AnsiColor, LogLevels
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, GREY = range(9)
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[%dm"
BOLD_SEQ = "\033[1m"
COLOR_MAP = {
logging.DEBUG: GREY,
logging.... | PypiClean |
/DocOnce-1.5.15-py3-none-any.whl/doconce/rst.py | from __future__ import absolute_import
from builtins import zip
from builtins import str
from builtins import range
from past.builtins import basestring
import os, sys
import regex as re
import shlex
from .common import insert_code_blocks, insert_tex_blocks, \
indent_lines, table_analysis, plain_exercise, bibliogra... | PypiClean |
/ConStrain-0.3.0.tar.gz/ConStrain-0.3.0/constrain/lab/transformation.py | # standard libraries
from datetime import datetime, timedelta
import numpy as np
import pandas as pd
from pydna.dseqrecord import Dseqrecord
# for plotting with pyplot
import matplotlib.pyplot as plt
def ng_to_nmol(ng: float, bp: float):
"""Calculates nanogram to nanomol for transformation mixes.
To do a tr... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/levelSet/electroChem/surfactantBulkDiffusionEquation.py | from __future__ import division
from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
from fipy.terms.implicitSourceTerm import ImplicitSourceTerm
from fipy.variables.levelSetDiffusionVariable import _LevelSetDiffusionVariable
from fipy.terms.transientTerm import TransientTerm
from fipy.terms.diff... | PypiClean |
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20.20/plugins/common/table/lib/table-selection.js | define(
['aloha', 'aloha/jquery', 'table/table-plugin-utils', 'table/table-cell', 'i18n!table/nls/i18n'],
function (Aloha, $, Utils, TableCell, i18n) {
/**
* The TableSelection object is a helper-object
*/
var TableSelection = function (table) {
this.table = table;
};
/**
* Gives the type of the cell-selec... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/standard/plugins/a11yhelp/dialogs/lang/de.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("a11yhelp","de",{title:"Barrierefreiheitinformationen",contents:"Hilfeinhalt. Um den Dialog zu schliessen die Taste ESC drücken."... | PypiClean |
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/hyperion/densities/alpha_disk.py | from __future__ import print_function, division
import numpy as np
from astropy import log as logger
from astropy.extern import six
from ..dust import SphericalDust
from ..util.constants import pi, G
from ..util.convenience import OptThinRadius
from ..util.integrate import integrate_powerlaw
from ..util.validator imp... | PypiClean |
/MedPy-0.4.0.tar.gz/MedPy-0.4.0/medpy/graphcut/generate.py |
# build-in modules
import inspect
# third-party modules
import scipy
# own modules
from ..core import Logger
from .graph import GCGraph
from medpy.graphcut.energy_label import __check_label_image
def graph_from_voxels(fg_markers,
bg_markers,
regional_term = False,
... | PypiClean |
/GeobricksProj4ToEPSG-0.0.15.tar.gz/GeobricksProj4ToEPSG-0.0.15/geobricks_proj4_to_epsg/utils/epsg_json_file.py | import requests
import json
from geobricks_proj4_to_epsg.core.proj4_to_epsg import get_proj4_json_from_string
# TODO: @Deprecated
# dirty methods to get epsg/proj4 codes
epsg_json = []
cached_epsg_codes = []
def create_epsg_json_file():
with open("../data/epsg.json", "r") as f:
projection_list = json.loa... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/forms/boundfield.py | import re
from django.core.exceptions import ValidationError
from django.forms.utils import pretty_name
from django.forms.widgets import MultiWidget, Textarea, TextInput
from django.utils.functional import cached_property
from django.utils.html import format_html, html_safe
from django.utils.translation import gettext... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/build/lib/gqcms/matrices/Determinant.py | from itertools import combinations, product
import numpy as np
class Determinant:
"""
This class can be used to generate ONVs from a list of occupied orbitals
and generate all n-tuply exited determinants
:param alpha_occ: list of occupied alpha orbitals
:param beta_occ: list of occupied beta orbi... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/docs/reference/bibliography.rst | .. _bibliography:
Bibliography
============
This is a collection of various bibliographic items referenced in the
documentation.
.. [Adami2013] Adami C and Hintze A. (2013) Evolutionary instability of zero-determinant strategies demonstrates that winning is not everything. Nature communications. https://www.nature.c... | PypiClean |
/HumanFuture-0.2.tar.gz/HumanFuture-0.2/humanfuture.py | from datetime import datetime, timedelta
class NegativeDeltaError(Exception): pass
class UnformattableError(Exception): pass
def humanize(future, ref=None):
"""
Return a nice string representing a future datetime in english.
If you need to explicitely set the reference that the future is relative
to, ... | PypiClean |
/CodeIntel-2.0.0b19-cp34-cp34m-macosx_10_12_x86_64.whl/codeintel/wininteg.py | # Dev Notes:
# - On Win9x QueryValueEx returns the empty string for a non-existant
# default key value. On non-Win9x an EnvironmentError is raised. Care has
# been made in the code to handle this API semantic difference.
#
#TODO:
# - Use the ASSOC and FTYPE command line utils instead of all this
# registry en... | PypiClean |
/CUQIpy-FEniCS-0.4.0.tar.gz/CUQIpy-FEniCS-0.4.0/README.md | # CUQIpy-FEniCS
CUQIpy-FEniCS is a plugin for [CUQIpy](https://github.com/CUQI-DTU/CUQIpy) software package. It provides an interface between FEniCS PDE models and CUQIpy modules.
## Installation
First install [FEniCS](https://fenicsproject.org/download/archive/) (we recommend using Anaconda from the available install... | PypiClean |
/Julep-0.3.1.tar.gz/Julep-0.3.1/julep/config.py |
import imp
import socket
import os
import signal
import logging
import sys
import scoreboard
class ServerConfig(object):
_default_options = {
"num_servers" : 4,
"max_connections" : 32,
"preload_hooks" : [],
"max_requests" : 4096,
"max_errors" : 16,
"max_request_time" : 30
}
@property
def default_opt... | PypiClean |
/Bayesian-0.3.3-py3-none-any.whl/bayesian/samples.py | import sys
sys.path.append('../')
from bayesian import Bayes, classify_normal, classify
print(' == High Level Functions == ')
print(' -- Gender Classification -- ')
# Decides if the person with those measures is male or female.
print(classify_normal({'height': 6, 'weight': 130, 'foot size': 8},
... | PypiClean |
/ElasticQuery-3.2.tar.gz/ElasticQuery-3.2/elasticquery/dsl.py |
from .dsl_util import make_struct, unroll_definitions, unroll_struct
class MetaQuery(type):
'''
Metaclass mapping attributes to dsl objects on Filter/Query getattr.
'''
def __init__(cls, name, bases, d):
super(MetaQuery, cls).__init__(name, bases, d)
unroll_definitions(cls._definitio... | PypiClean |
/BCAWT-1.0.6.tar.gz/BCAWT-1.0.6/README.md | # BCAWT: Automated tool for codon usage bias analysis for molecular evolution
[](https://travis-ci.org/AliYoussef96/BCAW-Tool)
[](https:... | PypiClean |
/MultiRunnable-0.17.0a2-py3-none-any.whl/multirunnable/framework/api/operator.py | from typing import Union, NewType
from abc import ABCMeta, abstractmethod
from ...types import (
MRLock as _MRLock,
MRRLock as _MRRLock,
MRSemaphore as _MRSemaphore,
MRBoundedSemaphore as _MRBoundedSemaphore,
MREvent as _MREvent,
MRCondition as _MRCondition,
MRQueue as _MRQueue
)
__MRFeat... | PypiClean |
/BanterBot-0.0.5.tar.gz/BanterBot-0.0.5/banterbot/utils/word.py | import datetime
from dataclasses import dataclass
from typing import Optional
import azure.cognitiveservices.speech as speechsdk
from banterbot.data.enums import SpeechProcessingType, WordCategory
@dataclass(frozen=True)
class Word:
"""
This class encapsulates a word in the output of a text-to-speech synthe... | PypiClean |
/Flask-Excel-0.0.7.tar.gz/Flask-Excel-0.0.7/CHANGELOG.rst | Change log
================================================================================
0.0.7 - 20.07.2017
--------------------------------------------------------------------------------
Updated
********************************************************************************
#. the intialization method has been... | PypiClean |
/Bedframe-0.13.5.tar.gz/Bedframe-0.13.5/bedframe/webtypes/_python/_datetime.py |
__copyright__ = "Copyright (C) 2014 Ivan D Vasin"
__docformat__ = "restructuredtext"
import datetime as _datetime
import re as _re
import pytz as _tz
from .. import _core
class datetime(_core.webobject):
"""A web-transmittable date and time
This wraps a timezone-aware :class:`datetime.datetime`.
""... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/lorem/bn_BD/__init__.py | from typing import Dict
from .. import Provider as LoremProvider
class Provider(LoremProvider):
"""Implement lorem provider for ``bn_BD`` locale."""
# source 1: https://en.wikipedia.org/wiki/Bengali_vocabulary
# source 2: https://en.wikipedia.org/wiki/Bengali_grammar
word_connector = " "
senten... | PypiClean |
/FFC-2017.1.0.tar.gz/FFC-2017.1.0/ffc/plot.py | "This module provides functionality for plotting finite elements."
# Copyright (C) 2010 Anders Logg
#
# This file is part of FFC.
#
# FFC 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 ... | PypiClean |
/DIY-FilingsResearch-0.3.0.tar.gz/DIY-FilingsResearch-0.3.0/threadedSearch.py |
# Multithreading Searcher and Indexer.
# One Thread Indexes new documents in the background
# while thread in the foreground waits for new user queries
# This searcher and indexer works from the terminal, simply start it.
# It begins indexing files in the directory you point it to.
# import needed system modules
impo... | PypiClean |
/CustomPipeline-0.0.3-py3-none-any.whl/rplibs/yaml/yaml_py3/scanner.py |
__all__ = ['Scanner', 'ScannerError']
from .error import MarkedYAMLError
from .tokens import *
class ScannerError(MarkedYAMLError):
pass
class SimpleKey:
# See below simple keys treatment.
def __init__(self, token_number, required, index, line, column, mark):
self.token_number = token_number
... | PypiClean |
/OTLModel/Classes/Abstracten/Kast.py | from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from abc import abstractmethod
from OTLMOW.OTLModel.Classes.Abstracten.Behuizing import Behuizing
from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField
from OTLMOW.OTLModel.Datatypes.DtcAfmetingBxlxhInMm import DtcAfmetingBxlxhInMm
from OTLMOW.... | PypiClean |
/LTHTools-1.0.2.tar.gz/LTHTools-1.0.2/lth_tools/torch_tools/NMS/NMS.py | __author__ = 'lth'
import torch
from . import bbox_iou
def nms(prediction, conf_threshold=0.1, nms_threshold=0.9):
"""
:param prediction: N,7,output_nums_from_model --> 7 [x,y,w,h,cls_pred,cls_conf,obj_conf]
:return:
"""
prediction = prediction.permute(0, 2, 1)
output = [None for _ in ran... | PypiClean |
/GetDist-1.4.3.tar.gz/GetDist-1.4.3/getdist/gui/SyntaxHighlight.py | try:
from PySide6.QtCore import QRegularExpression
from PySide6.QtGui import QColor, QTextCharFormat, QFont, QSyntaxHighlighter
except ImportError:
# noinspection PyUnresolvedReferences
from PySide2.QtCore import QRegularExpression
# noinspection PyUnresolvedReferences
from PySide2.QtGui import... | PypiClean |
/Kool-0.0.2-py3-none-any.whl/kool/db/models.py | from .flatfile import FlatFileDB, Query
from kool.utils import camel_to_snake, now
class Model(object):
db = None # database
def __init__(self, * args, ** kwargs):
"""
Model provides save, delete, purge operations to every
class that inherits it.
"""
# Get cl... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py | import base64
import ctypes
import itertools
import re
import os
import ssl
import tempfile
from .bindings import Security, CoreFoundation, CFConst
# This regular expression is used to grab PEM data out of a PEM bundle.
_PEM_CERTS_RE = re.compile(
b"-----BEGIN CERTIFICATE-----\n(.*?)\n-----END CERTIFICATE-----",... | PypiClean |
/CAMELS_library-0.3.tar.gz/CAMELS_library-0.3/plots/images_EX/plot_EX.py | from pylab import *
import numpy as np
from matplotlib.ticker import ScalarFormatter
import matplotlib.gridspec as gridspec
from mpl_toolkits.axes_grid1.inset_locator import mark_inset
from matplotlib.ticker import AutoMinorLocator
from matplotlib.colors import LogNorm
from matplotlib.patches import Ellipse
rcParams["m... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/league_demo/league_demo_ppo_config.py | from easydict import EasyDict
from torch.nn.modules.activation import Threshold
league_demo_ppo_config = dict(
exp_name="league_demo_ppo",
env=dict(
collector_env_num=8,
evaluator_env_num=10,
n_evaluator_episode=100,
env_type='prisoner_dilemma', # ['zero_sum', 'prisoner_dilemma... | PypiClean |
/6D657461666C6F77-0.0.17.tar.gz/6D657461666C6F77-0.0.17/metaflow/environment.py | import os
import platform
import sys
from .util import get_username, to_unicode
from . import metaflow_version
from metaflow.exception import MetaflowException
version_cache = None
class InvalidEnvironmentException(MetaflowException):
headline = 'Incompatible environment'
class MetaflowEnvironment(object):
... | PypiClean |
/AppZoo-2023.4.25.19.12.44.tar.gz/AppZoo-2023.4.25.19.12.44/appzoo/app.py |
from io import BytesIO
from starlette.status import *
from starlette.responses import *
from starlette.staticfiles import StaticFiles
from fastapi import FastAPI, Form, Depends, File, UploadFile, Body, Request, BackgroundTasks
# ME
from meutils.pipe import *
from meutils.str_utils import json_loads
# logger.add('... | PypiClean |
/BlueWhale3_Text-1.6.0-py3-none-any.whl/orangecontrib/text/widgets/owscoredocuments.py | import re
from collections import Counter
from contextlib import contextmanager
from inspect import signature
from typing import Callable, List, Tuple, Union
import numpy as np
from AnyQt.QtCore import (
QItemSelection,
QItemSelectionModel,
QSortFilterProxyModel,
Qt,
Signal,
)
from AnyQt.QtWidgets ... | PypiClean |
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/codemirror/mode/spreadsheet/spreadsheet.js |
(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 browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use... | PypiClean |
/CTkTable-0.8.tar.gz/CTkTable-0.8/README.md | # CTkTable
**Here is a quick and simple table widget having all the basic features.**

## Features:
- Add columns/rows
- Delete columns/rows
- Edit rows/columns at once
- Insert values to specific cell... | PypiClean |
/Flask-MySQLdb-1.0.1.tar.gz/Flask-MySQLdb-1.0.1/README.md | Flask-MySQLdb [](https://app.travis-ci.com/alexferl/flask-mysqldb)
================
Flask-MySQLdb provides MySQL connection for Flask.
Quickstart
----------
First, you _may_ need to install some dependencies for [mysqlclient](https://... | PypiClean |
/Ifbyphone-API-Module-0.0.5.tar.gz/Ifbyphone-API-Module-0.0.5/src/Ifbyphone/api/sms.py | from base import IfbyphoneApiBase
class Sms(IfbyphoneApiBase):
def send(self, **kwargs):
""" Send an outbound SMS message
keyword arguments:
to -- number to receive SMS message
from -- Ifbyphone enabled SMS number
message -- SMS message
... | PypiClean |
/Mesa-2.1.1-py3-none-any.whl/mesa/visualization/templates/external/bootstrap-slider-11.0.2/test/specs/PublicMethodsSpec.js | describe("Public Method Tests", function() {
var testSlider;
describe("slider constructor", function() {
describe("returns a jQuery object if it is called on a jQuery object with zero or more matching elements", function() {
it("returns a jQuery object if it is called on with no matching elements", funct... | PypiClean |
/MPoL-0.1.13.tar.gz/MPoL-0.1.13/src/mpol/fourier.py | r"""The ``fourier`` module provides the core functionality of MPoL via :class:`mpol.fourier.FourierCube`."""
import numpy as np
import torch
import torch.fft # to avoid conflicts with old torch.fft *function*
import torchkbnufft
from torch import nn
from . import utils
from .coordinates import GridCoords
from .gridd... | PypiClean |
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_budgets/post.py | from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict
from firefly_iii_client import api_client, exceptions
from datetime import date, datetime # noqa: F401
import decimal # noqa: F401
import functools # noqa: F401
import io # noqa: F401
import re... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/encoding/digests/MD5.js | define("dojox/encoding/digests/MD5",["./_base"],function(_1){
var _2=8;
function R(n,c){
return (n<<c)|(n>>>(32-c));
};
function C(q,a,b,x,s,t){
return _1.addWords(R(_1.addWords(_1.addWords(a,q),_1.addWords(x,t)),s),b);
};
function FF(a,b,c,d,x,s,t){
return C((b&c)|((~b)&d),a,b,x,s,t);
};
function GG(a,b,c,d,x,s,t){
re... | PypiClean |
/360monitoringcli-1.0.19-py3-none-any.whl/cli360monitoring/lib/wptoolkit.py |
from prettytable import PrettyTable
from .config import Config
from .servers import Servers
class WPToolkit(object):
def __init__(self, config: Config):
self.config = config
self.table = PrettyTable(field_names=['ID', 'Server name', 'WP sites', 'Alive', 'Outdated', 'Outdated PHP', 'Broken'])
... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/Reward/_alertCostScore.py |
import numpy as np
from grid2op.Reward.baseReward import BaseReward
from grid2op.Reward._newRenewableSourcesUsageScore import _NewRenewableSourcesUsageScore
from grid2op.dtypes import dt_float
from grid2op.Exceptions import Grid2OpException
import warnings
#TODO
# Test this class comprehensively if usage is revived.
... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.