id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/object_detection/meta_architectures/context_rcnn_lib.py | """Library functions for ContextRCNN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v1 as tf
import tf_slim as slim
# The negative value used in padding the invalid weights.
_NEGATIVE_PADDING_VALUE = -100000
def filter_weigh... | PypiClean |
/FastCNN2-1.23.425.1716.tar.gz/FastCNN2-1.23.425.1716/FastCNN/prx/YoloV5DetectProxy.py | import argparse
import os
import sys
import time
import threading
import numpy as np
from pathlib import Path
import torch
import torch.backends.cudnn as cudnn
FILE = Path(__file__).resolve()
ROOT = FILE.parents[0] # YOLOv5 root directory
if str(ROOT) not in sys.path:
sys.path.append(str(ROOT)) # add ROOT to ... | PypiClean |
/CoreMS-1.6.0.tar.gz/CoreMS-1.6.0/corems/molecular_id/calc/MolecularFilter.py | from corems.molecular_id.calc.ClusterFilter import ClusteringFilter
class MolecularFormulaSearchFilters:
@staticmethod
def filter_kendrick( ms_peak_indexes, mass_spectrum_obj):
index_to_remove = []
if mass_spectrum_obj.molecular_search_settings.use_runtime_kendrick_filter:
... | PypiClean |
/ObjectDetection_aeye-0.0.3-py3-none-any.whl/objectDetection/detect.py | from torchvision import transforms
from utils import *
from PIL import Image, ImageDraw, ImageFont
from model import SSD300
from definitions import ROOT_DIR, device
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Load model checkpoint
checkpoint = ROOT_DIR/'output/checkpoint_ssd300-150.pth.t... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/cmorizers/data/formatters/datasets/mte.py | import logging
import os
import iris
from cf_units import Unit
from iris import NameConstraint
from esmvaltool.cmorizers.data import utilities as utils
logger = logging.getLogger(__name__)
def _fix_time_coord(cube):
"""Set time points to central day of month."""
time_coord = cube.coord('time')
new_unit... | PypiClean |
/Auxjad-1.0.0.tar.gz/Auxjad-1.0.0/auxjad/mutate/contract_notes.py | import abjad
from .. import get, mutate
def contract_notes(container: abjad.Container,
max_contraction_duration: abjad.Duration,
*,
minimum_duration: abjad.Duration = abjad.Duration((0, 1)),
use_multimeasure_rests: bool = True,
... | PypiClean |
/ItsUtils-0.2.2.tar.gz/ItsUtils-0.2.2/its_utils/string_math.py | import re
from typing import Dict, List, Union
class StringMath:
'''
# Implementation of the shunting-yard algorithm
This programm uses the shunting-yard algorithm to convert a stringified mathematical expression into a postfix notation.
It then uses the postfix notation to calculate the result ... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/DjangoAppCenter/simpleui/static/admin/simpleui-x/elementui/locale/lang/el.js | 'use strict';
exports.__esModule = true;
exports.default = {
el: {
colorpicker: {
confirm: 'Εντάξει',
clear: 'Καθαρισμός'
},
datepicker: {
now: 'Τώρα',
today: 'Σήμερα',
cancel: 'Ακύρωση',
clear: 'Καθαρισμός',
... | PypiClean |
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/rl/environments/ode/environment.py |
import sys, time
from scipy import random, asarray
import xode.parser, xode.body, xode.geom #@UnresolvedImport @UnusedImport @Reimport
import ode #@UnresolvedImport
from pybrain.rl.environments.environment import Environment
from tools.configgrab import ConfigGrabber
import sensors, actuators
from pybrain.utilities i... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/bower_components/shadycss/apply-shim.min.js | (function(){/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http... | PypiClean |
/JumpScale-core-6.0.0.tar.gz/JumpScale-core-6.0.0/lib/JumpScale/core/baseclasses/BaseEnumeration.py | import os.path
import re
import keyword
from JumpScale import j
IDENTIFIER_RE = re.compile('^[a-zA-Z_][a-zA-Z0-9_]*$')
#TODO This could become a more general function
def isValidIdentifier(identifier):
'''Check whether a given string is a valid Python identifier (variable name)
In several places (when using ... | PypiClean |
/CNVkit-0.9.10-py3-none-any.whl/cnvlib/cluster.py | import logging
import numpy as np
def kmeans(samples, k=None):
from scipy.cluster import vq
if k is None:
from math import log
k = max(1, int(round(log(len(samples), 3))))
# E.g. n=66 -> k=2, 16 -> 3, 47 -> 4, 141 -> 5, 421 -> 6, 1263 -> 7
print("Clustering", len(samples), "sam... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/doc/internals/organization.rst | ==================================
Organization of the Sphinx project
==================================
The guide explains how the Sphinx project is organized.
Core developers
---------------
The core developers of Sphinx have write access to the main repository. They
can commit changes, accept/reject pull request... | PypiClean |
/BioSAK-1.72.0.tar.gz/BioSAK-1.72.0/doc/CheckM_cn.md |
+ only parse quality file
BioSAK CheckM -i checkm_op.txt -o MAG_qualities.txt
BioSAK CheckM -i checkm_op.txt -o MAG_qualities.txt -r
+ get the quality of qualified bins
BioSAK CheckM -i checkm_op.txt -cpl 99 -o MAG_qualities_cpl99.txt
BioSAK CheckM -i checkm_op.txt -cpl 99 -ctm 5 -o MAG_qua... | PypiClean |
/LFPykit-0.5.1.tar.gz/LFPykit-0.5.1/examples/Example_LFPy_MEG.ipynb | # Example LFPy MEG
Demonstrate magnetic field predictions in a single point from current dipole moment with LFPy (https://LFPy.readthedocs.io, https://github.com/LFPy/LFPy).
The simulation is broken down in a few steps:
1. Simulate the neuron model and record all transmembrane currents with LFPy
2. Compute the curre... | PypiClean |
/GnB_probability_distributions-1.0.tar.gz/GnB_probability_distributions-1.0/GnB_probability_distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/ExifRead-3.0.0-py3-none-any.whl/exifread/tags/exif.py | from exifread.utils import make_string, make_string_uc
# Interoperability tags
INTEROP_TAGS = {
0x0001: ('InteroperabilityIndex', ),
0x0002: ('InteroperabilityVersion', ),
0x1000: ('RelatedImageFileFormat', ),
0x1001: ('RelatedImageWidth', ),
0x1002: ('RelatedImageLength', ),
}
INTEROP_INFO = (
... | PypiClean |
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/prototypes/tutorial/0. App_Fiddle/readme.md | # 1. Learn APIs using Flask / SQLAlchemy
This is a manually coded server providing a few APIs for [this database](https://apilogicserver.github.io/Docs/Sample-Database/).
It is the smallest example of a typical project for a modern database API server.
# APIs
Here's a brief overview of APIs.
## Req... | PypiClean |
/NMRPyStar-1.0.0.tar.gz/NMRPyStar-1.0.0/nmrpystar/starast.py | from nmrpystar.unparse.maybeerror import MaybeError
class StarBase(object):
'''
Provides default:
- equality
- inequality
- meaningful string representation
'''
def __eq__(self, other):
try:
return self.__dict__ == other.__dict__
except: # if the other ... | PypiClean |
/CubicReport-0.4.18.tar.gz/CubicReport-0.4.18/geraldo/generators/csvgen.py | import datetime, csv
from base import ReportGenerator
from geraldo.utils import get_attr_value, calculate_size
from geraldo.widgets import Widget, Label, SystemField, ObjectValue
from geraldo.graphics import Graphic, RoundRect, Rect, Line, Circle, Arc,\
Ellipse, Image
from geraldo.exceptions import AbortEvent
... | PypiClean |
/DJModels-0.0.6-py3-none-any.whl/djmodels/contrib/gis/forms/widgets.py | import logging
from djmodels.conf import settings
from djmodels.contrib.gis import gdal
from djmodels.contrib.gis.geometry import json_regex
from djmodels.contrib.gis.geos import GEOSException, GEOSGeometry
from djmodels.forms.widgets import Widget
from djmodels.utils import translation
logger = logging.getLogger('dj... | PypiClean |
/Ibid-0.1.1.tar.gz/Ibid-0.1.1/docs/html/searchindex.js | Search.setIndex({desctypes:{"0":"class","1":"function","2":"attribute","3":"method","4":"exception"},terms:{represent:8,all:[4,5,6,7,8,9,11,12,13,14,15],code:[3,5,7,8,9,11,13,14,15],config_kei:9,edg:14,chain:15,skip:[5,11],consum:14,month:[8,14,10],although:[13,14],prefix:[9,13],sleep:5,upgrad:7,abil:7,follow:[4,6,7,11... | PypiClean |
/125softNLP-0.0.1-py3-none-any.whl/kashgari/tasks/labeling/base_model.py |
# author: BrikerMan
# contact: eliyar917@gmail.com
# blog: https://eliyar.biz
# file: base_model.py
# time: 2019-05-20 13:07
from typing import Dict, Any, Tuple
import random
import logging
from seqeval.metrics import classification_report
from seqeval.metrics.sequence_labeling import get_entities
from kashgari.t... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/data/PersevereStore.js.uncompressed.js | define("dojox/data/PersevereStore", ["dojo", "dojox", "require", "dojox/data/JsonQueryRestStore", "dojox/rpc/Client", "dojo/_base/url"], function(dojo, dojox, require) {
// PersevereStore is an extension of JsonRestStore to handle Persevere's special features
dojox.json.ref.serializeFunctions = true; // Persevere sup... | PypiClean |
/Kickbase_Bot-0.0.15.tar.gz/Kickbase_Bot-0.0.15/kickbase_bot/persistence.py | from datetime import tzinfo, timezone
from threading import Lock
import pymongo
from kickbase_api.models.chat_item import ChatItem
from kickbase_api.models.feed_item import FeedItem, FeedType
from kickbase_api.models.feed_meta import FeedMeta
from kickbase_api.models.league_data import LeagueData
from kickbase_api.mod... | PypiClean |
/IntelliCoder-0.5.2.tar.gz/IntelliCoder-0.5.2/intellicoder/main.py | from __future__ import division, absolute_import, print_function
import logging
import sys
import os
from collections import OrderedDict
import click
from pkg_resources import resource_filename
from . import VERSION_PROMPT, PROGRAM_NAME
from .init import _, LevelFormatter
from .converters import Converter
from .datab... | PypiClean |
/Kivy-2.2.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl/kivy/input/providers/mouse.py | __all__ = ('MouseMotionEventProvider', )
from kivy.base import EventLoop
from collections import deque
from kivy.logger import Logger
from kivy.input.provider import MotionEventProvider
from kivy.input.factory import MotionEventFactory
from kivy.input.motionevent import MotionEvent
# late binding
Color = Ellipse = No... | PypiClean |
/ARS-0.5a2.zip/ARS-0.5a2/demos/Vehicle2.py | from ars.app import Program
import ars.constants as cts
class Vehicle2(Program):
TORQUE = 30
OFFSET = (3, 1, 3)
FLOOR_BOX_SIZE = (20, 0.01, 20)
def __init__(self):
"""Constructor, calls the superclass constructor first."""
Program.__init__(self)
self.key_press_functions.add('up', self.go_forwards, True)
... | PypiClean |
/HupuApp-1.1.0.tar.gz/HupuApp-1.1.0/hupu/messages/messages.py | from six import python_2_unicode_compatible
from hupu.messages.entries import StringEntry, IntEntry, ListEntry, to_text
from hupu.api import logger
log = logger.getLogger(__name__)
class BaseMessage(object):
__type__ = 'base'
def __init__(self, message):
self.__dict__.update(message)
def __rep... | PypiClean |
/GB2260-v2-0.2.1.tar.gz/GB2260-v2-0.2.1/gb2260_v2/data/curated/revision_201612.py | from __future__ import unicode_literals
name = '201612'
division_schema = {
'110000': '北京市',
'110101': '东城区',
'110102': '西城区',
'110105': '朝阳区',
'110106': '丰台区',
'110107': '石景山区',
'110108': '海淀区',
'110109': '门头沟区',
'110111': '房山区',
'110112': '通州区',
'110113': '顺义区',
'11011... | PypiClean |
/FLAI_CAUSAL-1.1.0-py3-none-any.whl/FLAI/causal_graph.py | from FLAI import data
import bnlearn as bn
import networkx as nx
import matplotlib.pyplot as plt
from pgmpy.factors.discrete import TabularCPD
import numpy as np
import itertools
import math
class CausalGraph():
"""
The CausalGraph class represents a causal Bayesian network and provides methods for its manipula... | PypiClean |
/DeSide-1.0.2.tar.gz/DeSide-1.0.2/deside/plot/plot_sample.py | import os
# import seaborn as sns
from ..utility import check_dir, set_fig_style
import matplotlib.pyplot as plt
# sns.set(palette='muted', font_scale=1.5)
set_fig_style()
def plot_sample_distribution(re_sampled_df, marker_ratio_tcga, marker_ratio_simu_bulk,
cell_type, bins=10, density: b... | PypiClean |
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/doc/doc-api/kdvs.fw.rst | fw Package
==========
:mod:`fw` Package
-----------------
.. automodule:: kdvs.fw
:members:
:undoc-members:
:show-inheritance:
:mod:`Annotation` Module
------------------------
.. automodule:: kdvs.fw.Annotation
:members:
:undoc-members:
:show-inheritance:
:mod:`App` Module
----------------... | PypiClean |
/BlueWhale3-Recommendation-0.1.3.tar.gz/BlueWhale3-Recommendation-0.1.3/orangecontrib/recommendation/rating/brismf.py | from orangecontrib.recommendation.rating import Learner, Model
from orangecontrib.recommendation.utils.format_data import *
from orangecontrib.recommendation.optimizers import *
import numpy as np
import time
import warnings
__all__ = ['BRISMFLearner']
__sparse_format__ = lil_matrix
def _predict(users, items, globa... | PypiClean |
/BMI-OpenGMS-Engine-0.1.2.tar.gz/BMI-OpenGMS-Engine-0.1.2/BMI_OpenGMS_Engine/resource/bmi/getter_setter.py | class BmiGetter(object):
"""Get values from a component.
Methods that get variables from a model's state. Often a model's state
variables are changing with each time step, so getters are called to get
current values.
"""
def get_value(self, var_name):
"""Get a copy of values of the gi... | PypiClean |
/DataSae-0.1.37.tar.gz/DataSae-0.1.37/datasae/export_import/rules.py |
# GNU AFFERO GENERAL PUBLIC LICENSE
# Version 3, 19 November 2007
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
# ... | PypiClean |
/DSPP-Keras-0.0.5.tar.gz/DSPP-Keras-0.0.5/dsppkeras/utils/data_utils.py | from __future__ import absolute_import
from __future__ import print_function
import functools
import tarfile
import zipfile
import os
import sys
import shutil
import hashlib
import six
from six.moves.urllib.request import urlopen
from six.moves.urllib.error import URLError
from six.moves.urllib.error import HTTPError
... | PypiClean |
/DracoPy-0.0.10.tar.gz/DracoPy-0.0.10/draco/docs/spec/prediction.parallelogram.decoder.md | ## Parallelogram Prediction Decoder
### GetParallelogramEntries()
~~~~~
void GetParallelogramEntries(ci, opp_entry,
next_entry, prev_entry) {
CornerToVerts(curr_att_dec, ci, &v, &n, &p);
opp_entry = vertex_to_encoded_attribute_value_index_map[curr_att_dec][v];
next_entry = vertex_to... | PypiClean |
/Comrade-1.0.0.tar.gz/Comrade-1.0.0/comrade/configuration.py | from __future__ import print_function
import json
import re
from .utils import clean_user_input, get_pretty_user_var
from builtins import input
from os import path
from shutil import copy
def find_config():
home = path.expanduser("~")
user_config = path.join(home, "comrade-config.json")
if not path.exists... | PypiClean |
/DoorPi-2.4.1.8.tar.gz/DoorPi-2.4.1.8/doorpi/status/requirements_lib/req_system.py |
import logging
logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
REQUIREMENT = dict(
fulfilled_with_one = False,
text_description = 'Alle Module vom Bereich System sind für den Betrieb von DoorPi an verschiedenen Stellen zwingend nötig.',
events = [
#dict( name = 'OnWebServer... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/bots/set_bot_default_privileges.py |
import pyrogram
from pyrogram import raw
from pyrogram import types
class SetBotDefaultPrivileges:
async def set_bot_default_privileges(
self: "pyrogram.Client",
privileges: "types.ChatPrivileges" = None,
for_channels: bool = None
) -> bool:
"""Change the default privileges re... | PypiClean |
/DeepPhysX.Torch-22.12-py3-none-any.whl/DeepPhysX/examples/Torch/tutorial/UNet.py | import torch
from time import time
# DeepPhysX's PyTorch imports
from DeepPhysX.Torch.UNet.UNetConfig import UNetConfig
def main():
# UNet configuration
unet_config = UNetConfig(network_dir=None, # Path with a trained network to load parameters
network_name=... | PypiClean |
/Jalapeno-Lite-0.1.3.tar.gz/Jalapeno-Lite-0.1.3/Jalapeno_data/Sites/first/Pages/blog/7.md | title: 财务报表分析:报表简介
date: 2016-09-08
tag: 公司金融
[TOC]
<!--Sidebar-->
##财务报表简介
财务报表指日常会计核算资料的基础上按照规定方式编写的综合反映企业某一日期的财务状况,经营成果的书面文件。它主要分为三大部分,它们分别是:
- 资产负债表(Balance sheet),公司的资产和负债,体现公司在某一时刻下的财务状况
- 损益表 (Income statement),指出公司的运营表现,盈利或者亏损
- 现金流量表 (Cash Flow statement) 指出在某一时间段内公司的现金流动情况
通过这些报表我们可以多方位地了解到公司的状况。
- 对于经理... | PypiClean |
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/freezer/DependsExe.py | import os
from nuitka.containers.OrderedSets import OrderedSet
from nuitka.Options import assumeYesForDownloads
from nuitka.Tracing import inclusion_logger
from nuitka.utils.Download import getCachedDownload
from nuitka.utils.Execution import executeProcess, withEnvironmentVarOverridden
from nuitka.utils.FileOperation... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/nls/de/colors.js | define(
"dojo/nls/de/colors", //begin v1.x content
({
// local representation of all CSS3 named colors, companion to dojo.colors. To be used where descriptive information
// is required for each color, such as a palette widget, and not for specifying color programatically.
//Note: due to the SVG 1.0 spec additions, s... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Vocabulary/Domain/Variables/Leafs/Hmacs/HMAC_SHA2_384.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/DSC_NSD_TEST-0.0.1-py3-none-any.whl/DSC_NSD_TEST/DSC_NSD_TEST.py | import numpy as np
import nibabel as nb
import os
from collections import OrderedDict
import pandas as pd
join = os.path.join
import torch
import numpy as np
import scipy.ndimage
neighbour_code_to_normals = [
[[0, 0, 0]],
[[0.125, 0.125, 0.125]],
[[-0.125, -0.125, 0.125]],
[[-0.25, -0.25, 0.0], [0.25, ... | PypiClean |
/LAMDA-SSL-1.0.2.tar.gz/LAMDA-SSL-1.0.2/LAMDA_SSL/Config/CAFA.py | from LAMDA_SSL.Augmentation.Vision.RandomHorizontalFlip import RandomHorizontalFlip
from LAMDA_SSL.Augmentation.Vision.RandomCrop import RandomCrop
from LAMDA_SSL.Opitimizer.SGD import SGD
from LAMDA_SSL.Scheduler.CosineAnnealingLR import CosineAnnealingLR
from LAMDA_SSL.Network.WideResNet import WideResNet
from LAMDA_... | PypiClean |
/Oasys-Canvas-Core-1.0.7.tar.gz/Oasys-Canvas-Core-1.0.7/orangecanvas/application/widgettoolbox.py | import logging
import six
from PyQt5.QtWidgets import (
QAbstractButton, QSizePolicy, QAction, QApplication
)
from PyQt5.QtGui import (
QDrag, QPalette,
QBrush, QIcon
)
from PyQt5.QtCore import (
Qt, QObject, QModelIndex, QSize, QEvent, QMimeData, QByteArray,
QDataStream, QIODevice
)
from PyQt5.... | PypiClean |
/LinkChecker-10.2.1-py3-none-any.whl/linkcheck/checker/__init__.py | import os
import html
import urllib.parse
from .. import url as urlutil, log, LOG_CHECK
MAX_FILESIZE = 1024 * 1024 * 10 # 10MB
def guess_url(url):
"""Guess if URL is a http or ftp URL.
@param url: the URL to check
@type url: unicode
@return: url with *http://* or *ftp://* prepended if it's detecte... | PypiClean |
/CNVkit-0.9.10-py3-none-any.whl/cnvlib/segmetrics.py | import logging
import numpy as np
# import pandas as pd
from scipy import stats
from . import descriptives
def do_segmetrics(
cnarr,
segarr,
location_stats=(),
spread_stats=(),
interval_stats=(),
alpha=0.05,
bootstraps=100,
smoothed=False,
skip_low=False,
):
"""Compute segme... | PypiClean |
/Flask-LwAdmin-0.6.3.tar.gz/Flask-LwAdmin-0.6.3/flask_lwadmin/config.py | __author__ = 'ldath'
from flask import (
url_for,
session
)
from flask_wtf import Form
from flask_lwadmin import ConfigurationError
# Default list object actions
default_loa = [
{
'key': 'edit',
'label': 'Edit',
'icon': 'icon-edit',
'call': 'set_edit_button'
},
{
... | PypiClean |
/Axelrod-4.13.0.tar.gz/Axelrod-4.13.0/axelrod/action.py | from enum import Enum
from functools import total_ordering
from typing import Iterable, Tuple
class UnknownActionError(ValueError):
"""Error indicating an unknown action was used."""
def __init__(self, *args):
super(UnknownActionError, self).__init__(*args)
@total_ordering
class Action(Enum):
"... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/pending_approval/pending_approval.py | from loguru import logger
from flexget import plugin
from flexget.event import event
from flexget.manager import Session
from . import db
logger = logger.bind(name='pending_approval')
class PendingApproval:
schema = {
'type': 'boolean',
'deprecated': 'pending_approval is deprecated, switch to u... | PypiClean |
/Linum-0.9.12.tar.gz/Linum-0.9.12/linum/txt_renderer/base/row.py | from typing import List, Union, Optional
from linum.txt_renderer.enums import Align
from .border import Border
from .cell import Cell
class Row:
def __init__(self, cells: Optional[List[Cell]] = None):
"""
Строка.
:param cells: список ячеек для отображения.
"""
self.cells... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/webidl-conversions/lib/index.js | "use strict";
var conversions = {};
module.exports = conversions;
function sign(x) {
return x < 0 ? -1 : 1;
}
function evenRound(x) {
// Round x to the nearest integer, choosing the even integer if it lies halfway between two.
if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. f... | PypiClean |
/Mopidy_MPD-3.3.0-py3-none-any.whl/mopidy_mpd/session.py | import logging
from mopidy_mpd import dispatcher, formatting, network, protocol
from mopidy_mpd.protocol import tagtype_list
logger = logging.getLogger(__name__)
class MpdSession(network.LineProtocol):
"""
The MPD client session. Keeps track of a single client session. Any
requests from the client is p... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/NumFloorDetector/lib/efficientnet/utils.py | import re
import math
import collections
from functools import partial
import torch
from torch import nn
from torch.nn import functional as F
from torch.utils import model_zoo
from .utils_extra import Conv2dStaticSamePadding
########################################################################
############### HELPE... | PypiClean |
/Congo-0.0.1.tar.gz/Congo-0.0.1/portfolio/component/static/portfolio/vendor/mdeditor/bower_components/codemirror/mode/r/r.js | CodeMirror.defineMode("r", function(config) {
function wordObj(str) {
var words = str.split(" "), res = {};
for (var i = 0; i < words.length; ++i) res[words[i]] = true;
return res;
}
var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_");
var builtins = wordObj("list q... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/storage/AirFileStorageProvider.js | define(["dijit","dojo","dojox","dojo/require!dojox/storage/manager,dojox/storage/Provider"],function(_1,_2,_3){
_2.provide("dojox.storage.AirFileStorageProvider");
_2.require("dojox.storage.manager");
_2.require("dojox.storage.Provider");
if(_2.isAIR){
(function(){
if(!_4){
var _4={};
}
_4.File=window.runtime.flash.fil... | PypiClean |
/Editobj3-0.2.tar.gz/Editobj3-0.2/README.rst | Editobj3
========
Editobj3 is an automatic dialog box generator for Python objects. It supports several backends; currenlty
Qt, GTK and HTML are supported. The HTML backend is based on `W2UI <http://w2ui.com>`_, and can be used
either in local single user mode, or in distributed multiple users mode.
Editobj3 dialog b... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.4.0/SCons/Node/Python.py | import SCons.Node
_memo_lookup_map = {}
class ValueNodeInfo(SCons.Node.NodeInfoBase):
__slots__ = ('csig',)
current_version_id = 2
field_list = ['csig']
def str_to_node(self, s):
return ValueWithMemo(s)
def __getstate__(self):
"""
Return all fields that shall be pickled... | PypiClean |
/Internet-in-a-Box-0.5.10.tar.gz/Internet-in-a-Box-0.5.10/iiab/gutenberg_models.py |
from .extensions import db
gutenberg_books_category_map = db.Table(u'gutenberg_books_category_map',
db.Column(u'book_id', db.INTEGER(), db.ForeignKey('gutenberg_books.textId'), primary_key=True),
db.Column(u'category_id', db.INTEGER(), db.ForeignKey('gutenberg_categories.id'), primary_key=True),
)
gutenberg... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/localization/pt-br/HelpDialog.js | MathJax.Localization.addTranslation("pt-br","HelpDialog",{version:"2.7.9",isLoaded:true,strings:{Help:"Ajuda do MathJax",MathJax:"*MathJax* \u00E9 uma biblioteca em JavaScript que permite aos autores a inclus\u00E3o de conte\u00FAdo matem\u00E1tico em suas p\u00E1ginas web. Como um renderizador, voc\u00EA n\u00E3o prec... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/widgets/visualize/utils/tree/rules.py | r"""Rules for classification and regression trees.
Tree visualisations usually need to show the rules of nodes, these classes make
merging these rules simple (otherwise you have repeating rules e.g. `age < 3`
and `age < 2` which can be merged into `age < 2`.
Subclasses of the `Rule` class should provide a nice interf... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/variables/gaussCellGradVariable.py | from __future__ import division
from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
__all__ = []
from fipy.variables.cellVariable import CellVariable
from fipy.tools import numerix
from fipy.tools import inline
from fipy.variables.faceGradContributionsVariable import _FaceGradContributions
cla... | PypiClean |
/GroupyAPI-0.10.3.tar.gz/GroupyAPI-0.10.3/groupy/api/attachments.py | from . import base
from groupy import utils
# use a class registry to enable factory creation of attachment objects
class AttachmentMeta(type):
_types = {}
def __init__(cls, name, bases, attrs):
cls._types[name.lower()] = cls
class Attachment(base.Resource, metaclass=AttachmentMeta):
"""Base at... | PypiClean |
/BIA_OBS-1.0.3.tar.gz/BIA_OBS-1.0.3/BIA/static/dist/node_modules/resolve/test/home_paths_sync.js | 'use strict';
var fs = require('fs');
var homedir = require('../lib/homedir');
var path = require('path');
var test = require('tape');
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var mv = require('mv');
var copyDir = require('copy-dir');
var tmp = require('tmp');
var HOME = homedir();
var hnm = ... | PypiClean |
/DendroPy_calver-2023.330.2-py3-none-any.whl/dendropy/interop/ete.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 |
/MAVR-0.93.tar.gz/MAVR-0.93/scripts/filter/filter_by_trimmomatic.py | __author__ = 'Sergei F. Kliver'
import os
import argparse
from RouToolPa.Tools.Filter import Trimmomatic
#from RouToolPa.Tools.Filter import FastQC
from RouToolPa.Routines import FileRoutines
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--sample_directory", action="store", dest="samples_dir", requ... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/lang/hr.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.lang.hr={dir:'ltr',editorTitle:'Rich text editor, %1, press ALT 0 for help.',toolbar:'Toolbar',editor:'Rich Text Editor',source:'Kôd',newPage:'Nova stranica',save:'... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/addon/lint/lint.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 |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/tetgen/_tetgen.py | import pathlib
import numpy as np
from ..__about__ import __version__
from .._common import warn
from .._exceptions import ReadError, WriteError
from .._helpers import register_format
from .._mesh import CellBlock, Mesh
def read(filename):
filename = pathlib.Path(filename)
if filename.suffix == ".node":
... | PypiClean |
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/server/api/timelapse.py | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import os
import threading
from urllib.parse import quote as urlquot... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/utils/l2rpn_idf_2023_scores.py |
import numpy as np
from grid2op.utils.l2rpn_2020_scores import ScoreL2RPN2020
from grid2op.Reward import L2RPNSandBoxScore, _NewRenewableSourcesUsageScore, _AlertTrustScore
from grid2op.utils.underlying_statistics import EpisodeStatistics
from grid2op.Exceptions import Grid2OpException
class ScoreL2RPN2023(ScoreL2RP... | PypiClean |
/Imap-CLI-0.7.tar.gz/Imap-CLI-0.7/imap_cli/search.py | import ast
import codecs
import datetime
import email
from email import header
import logging
import re
import sys
import docopt
import six
import imap_cli
from imap_cli import config
from imap_cli import const
from imap_cli import fetch
log = logging.getLogger('imap-cli-list')
usage = """Usage: imap-cli-search [op... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/quantifyBarcodes.py |
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copi... | PypiClean |
/FacebookWebBot-1.1.0-py3-none-any.whl/FacebookWebBot.py | from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import time
import os
import json
selfProfile = "https://mbasic.facebook.com/profile.php?fref=pb"
... | PypiClean |
/CGATReport-0.9.1.tar.gz/CGATReport-0.9.1/doc/trackers/DataMapping.py | from CGATReport.Tracker import Tracker
from collections import OrderedDict as odict
from random import randint
import pandas
class ReturnValue(Tracker):
tracks = ("track1", "track2", "track3")
def __call__(self, track):
return randint(0, 100)
class ReturnValueWithSlice(Tracker):
tracks = ("trac... | PypiClean |
/Houndify-2.1.0.tar.gz/Houndify-2.1.0/README.md | # Python Houndify SDK
The Houndify Python SDK allows you to make streaming voice and text queries to the Houndify API from your Python project. The SDK provides two classes **TextHoundClient** and **StreamingHoundClient** for making text and voice queries to the Houndify API. See the *Usage* section below as well as s... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/_base/unload.js.uncompressed.js | define("dojo/_base/unload", ["./kernel", "./connect"], function(dojo, connect) {
// module:
// dojo/unload
// summary:
// This module contains the document and window unload detection API.
var win = window;
/*=====
dojo.windowUnloaded = function(){
// summary:
// signal fired by impending window dest... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/levelSet/electroChem/adsorbingSurfactantEquation.py | from __future__ import division
from __future__ import unicode_literals
from builtins import object
__docformat__ = 'restructuredtext'
import platform
from fipy.terms.implicitSourceTerm import ImplicitSourceTerm
from fipy.variables.variable import Variable
from fipy.terms.explicitUpwindConvectionTerm import ExplicitU... | PypiClean |
/MPD_sima-0.18.2.tar.gz/MPD_sima-0.18.2/doc/build/html/_static/searchtools.js | if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
re... | PypiClean |
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/pym/bob/stringparser.py |
from .errors import ParseError
from .tty import WarnOnce
from .utils import infixBinaryOp
from collections.abc import MutableMapping
from types import MappingProxyType
import fnmatch
import pyparsing
import re
# need to enable this for nested expression parsing performance
pyparsing.ParserElement.enablePackrat()
NAM... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/qrcode/main.py | from qrcode import constants, exceptions, util
from qrcode.image.base import BaseImage
import six
from bisect import bisect_left
def make(data=None, **kwargs):
qr = QRCode(**kwargs)
qr.add_data(data)
return qr.make_image()
def _check_version(version):
if version < 1 or version > 40:
raise V... | PypiClean |
/MPInterfaces-2020.6.19.tar.gz/MPInterfaces-2020.6.19/mpinterfaces/calibrate.py |
from __future__ import division, print_function, unicode_literals, \
absolute_import
"""
Calibration module:
This module contains the classes for
1. Calibrate: Base class for specifying the parameters for
calibration and setting up the VASP jobs in directory
structure according to
2. CalibrateBulk: calibrating a... | PypiClean |
/BCPy2000-1.6.tar.gz/BCPy2000-1.6/src/SigTools/klr.py | import numpy
def klr_cg(K, Y, C=0, **kwargs):
"""
Regularised Kernel Logistic Regression Classifier
[alphab,f,J,obj]=klr_cg(K,Y,C,varargin)
Regularised Kernel Logistic Regression Classifier using a pre-conditioned
conjugate gradient solver on the primal objective function
J = C w' K w + sum_i log( (1 + exp( ... | PypiClean |
/helperFiles/utils.py | import re
import os
import moviepy.editor as mp
import math
import ffmpeg
from itertools import groupby
class Utils:
def __init__(self):
self.slice_per_sec = 2
def atoi(self, text):
return int(text) if text.isdigit() else text
def natural_keys(self, text):
return [self.atoi(c) f... | PypiClean |
/Findex_GUI-0.2.18-py3-none-any.whl/findex_gui/static/plugins/datepicker/bootstrap-datepicker.js | (function($, undefined){
var $window = $(window);
function UTCDate(){
return new Date(Date.UTC.apply(Date, arguments));
}
function UTCToday(){
var today = new Date();
return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
}
function alias(method){
return function(){
return this[metho... | PypiClean |
/CANberry-0.4.tar.gz/CANberry-0.4/canberry/bower_components/jquery/src/offset.js | define([
"./core",
"./var/strundefined",
"./core/access",
"./css/var/rnumnonpx",
"./css/curCSS",
"./css/addGetHookIf",
"./css/support",
"./core/init",
"./css",
"./selector" // contains
], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
var docElem = window.document.docum... | PypiClean |
/Lin-CMS-0.4.11.tar.gz/Lin-CMS-0.4.11/src/lin/manager.py | from flask import current_app
from werkzeug.local import LocalProxy
from .db import db
__all__ = ["Manager", "manager"]
class Manager(object):
"""manager for lin"""
# 路由函数的meta信息的容器
ep_meta = {}
def __init__(
self,
plugin_path,
group_model,
user_model,
ident... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/widgets/utils/overlay.py | import sys
import enum
import functools
import operator
from collections import namedtuple
from AnyQt.QtWidgets import (
QHBoxLayout, QPushButton, QLabel, QSizePolicy, QStyle, QAbstractButton,
QWidget, QStyleOption
)
from AnyQt.QtGui import QIcon, QPixmap, QPainter
from AnyQt.QtCore import Qt, QSize, QRect, QP... | PypiClean |
/NovalIDE-1.1.8-py3-none-any.whl/noval/python/pyeditor.py | import os
from tkinter import messagebox
from noval import _,GetApp,NewId
import noval.editor.code as codeeditor
import string
import keyword
import sys
import codecs
import noval.python.parser.scope as scope
import noval.python.interpreter.interpreter as pythoninterpreter
import intellisence
import nodeast
import nova... | PypiClean |
/Doxhooks-0.6.0.zip/Doxhooks-0.6.0/doxhooks/errors.py | __all__ = [
"DoxhooksError",
"DoxhooksDataError",
"DoxhooksDataFileError",
"DoxhooksFileError",
"DoxhooksFileSystemError",
"DoxhooksForbiddenLookupError",
"DoxhooksImportError",
"DoxhooksLookupError",
"DoxhooksTypeError",
"DoxhooksValueError",
]
class DoxhooksError(Exception):
... | PypiClean |
/BiblioPixel-3.4.46.tar.gz/BiblioPixel-3.4.46/bibliopixel/drivers/SPI/interfaces.py | import os
import math
from . import errors
from ... util import log
from .. spi_interfaces import SPI_INTERFACES
class SpiBaseInterface(object):
""" abstract class for different spi backends"""
def __init__(self, dev, spi_speed):
self._dev = dev
self._spi_speed = spi_speed
def send_packe... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/_source/core/commanddefinition.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the "virtual" {@link CKEDITOR.commandDefinition} class,
* which contains the defintion of a command. This file is for
* documentation purpos... | PypiClean |
/Naun-0.0.7.tar.gz/Naun-0.0.7/src/Nuan.py | import os, sys, time, dlib, face_recognition, cv2
import numpy as np
from PIL import Image
import pkg_resources
def facedetection(unknownimage, knownimage, path=None, save_path=None):
""" Takes an unknown image and looks for faces. """
haar_xml = pkg_resources.resource_filename(
'cv2',
'data/h... | PypiClean |
/DataSae-0.1.37.tar.gz/DataSae-0.1.37/datasae/datasource/minios3.py |
# GNU AFFERO GENERAL PUBLIC LICENSE
# Version 3, 19 November 2007
# Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
# ... | PypiClean |
/AC-Flask-HipChat-0.2.12.tar.gz/AC-Flask-HipChat-0.2.12/ac_flask/hipchat/auth.py | from ac_flask.hipchat.tenant import Tenant
from flask import _request_ctx_stack as stack, request
from flask import abort
import jwt
from werkzeug.local import LocalProxy
from functools import wraps
def require_tenant(func):
@wraps(func)
def inner(*args, **kwargs):
if not tenant:
abort(40... | PypiClean |
/flask-2.3.3-py3-none-any.whl/flask/wrappers.py | from __future__ import annotations
import typing as t
from werkzeug.exceptions import BadRequest
from werkzeug.wrappers import Request as RequestBase
from werkzeug.wrappers import Response as ResponseBase
from . import json
from .globals import current_app
from .helpers import _split_blueprint_path
if t.TYPE_CHECKI... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.