id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/Gnosis_Utils-1.2.2.tar.gz/Gnosis_Utils-1.2.2/gnosis/xml/relax/lex.py |
r"""
lex.py
This module builds lex-like scanners based on regular expression rules.
To use the module, simply write a collection of regular expression rules
and actions like this:
# lexer.py
import lex
# Define a list of valid tokens
tokens = (
'IDENTIFIER', 'NUMBER', 'PLUS', 'MINUS'
)
# Define tokens as f... | PypiClean |
/NSoL-0.1.14.tar.gz/NSoL-0.1.14/nsol/solver.py |
# Import libraries
import numpy as np
import datetime
from abc import ABCMeta, abstractmethod
import pysitk.python_helper as ph
##
# Abstract class to define a numerical solver
# \date 2017-07-20 23:17:11+0100
#
class Solver(object):
__metaclass__ = ABCMeta
##
# Store relevant information common ... | PypiClean |
/BooleanNet-1.2.8.tar.gz/BooleanNet-1.2.8/scripts/network_repair_functions.py | import networkx as nx
import numpy as np
from itertools import product
from random import choice, randrange
def form_network(rules):
'''
Takes as input a list of rules in the format of sample_network.txt.
Outputs a networkx DiGraph with node properties:
'update_nodes': a list of regulating nodes
... | PypiClean |
/lesionmap-1.0.0-py3-none-any.whl/scr/LesionMapUCSF/predict.py |
from config import *
from data import *
from utils import *
from models import *
import six
import matplotlib.pyplot as plt
from tqdm import tqdm
from cv2 import imread, imwrite, resize, INTER_NEAREST
from keras import backend as K
import nibabel as nib
K.set_image_data_format('channels_last')
if K.image_data_format(... | PypiClean |
/Flask-REST-JSONAPI-0.31.2.tar.gz/Flask-REST-JSONAPI-0.31.2/flask_rest_jsonapi/schema.py | from marshmallow import class_registry
from marshmallow.base import SchemaABC
from marshmallow_jsonapi.fields import Relationship, List, Nested
from flask_rest_jsonapi.exceptions import InvalidInclude
def compute_schema(schema_cls, default_kwargs, qs, include):
"""Compute a schema around compound documents and s... | PypiClean |
/KDVS-2.0.0.tar.gz/KDVS-2.0.0/kdvs/fw/impl/report/L1L2.py |
r"""
Provides concrete implementation of reporters that are associated with statistical
techniques which utilize `l1l2py <http://slipguru.disi.unige.it/Software/L1L2Py/>`_
library and all associated functionalities such as selectors. Refer to
individual reporters for more details. IMPORTANT NOTE: the functionality of ... | PypiClean |
/AMD-2.2.0.tar.gz/AMD-2.2.0/README.md | # Arduino_Master_Delta(AMD) Version 2.2.0
## From Version 2.2 AMD will stand for Arduino-Matplotlib-DataScience since I've implemented various functions as in the new expansion in this single module.

:
"""Check if the center of blob is inside ROI
Arguments
blobs -- list or array of areas oссupied by the nanoparticle
(y, x, r) y and x are coordinates of the center and r - radius
... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/pouchdb-find/www/ace/mode-javascript.js | define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{de... | PypiClean |
/JoUtil-1.3.3-py3-none-any.whl/JoTools/utils/XmlUtil.py |
import xml.dom.minidom
from xml.dom.minidom import Document
class XmlUtil(object):
# ------------------------------ write xml -------------------------------------------------------------------------
@staticmethod
def get_document(head_time_str='xml'):
"""return document for xml writing"""
... | PypiClean |
/COMPAS-1.17.5.tar.gz/COMPAS-1.17.5/src/compas/datastructures/mesh/mesh.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from math import pi
from itertools import product
import compas
if compas.PY2:
from collections import Mapping
else:
from collections.abc import Mapping
from compas.files import OBJ
from compas.files... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/lang/zh-cn.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['zh-cn']={"editor":"所见即所得编辑器","editorPanel":"所见即所得编辑器面板","common":{"editorHelp":"按 ALT+0 获得帮助","browseServer":"浏览服务器","url":"URL","protocol":"协议","upload":"上传","... | PypiClean |
/NVDA-addonTemplate-0.5.2.zip/NVDA-addonTemplate-0.5.2/NVDAAddonTemplate/data/{{cookiecutter.project_slug}}/scons-local-2.5.0/SCons/Tool/FortranCommon.py |
__revision__ = "src/engine/SCons/Tool/FortranCommon.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog"
import re
import os.path
import SCons.Action
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
def isfortran(env, source):
"""Return 1 if any of code in source ha... | PypiClean |
/Hocrox-0.3.0.tar.gz/Hocrox-0.3.0/hocrox/utils/layer.py | import random
class Layer:
"""Layer class is used to make layers for Hocrox.
Here is an example code for making a new custom CropCustom Hocrox layer using this Layer class as a base class.
```python
from hocrox.utils import Layer
class CropCustom(Layer):
def __init__(self, x, y, w, h, n... | PypiClean |
/OASYS1-SRW-1.1.106.tar.gz/OASYS1-SRW-1.1.106/orangecontrib/srw/widgets/optical_elements/ow_srw_zone_plate.py | import numpy
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from wofrysrw.beamline.optical_elements.other.srw_zone_plate import SRWZonePlate
from orangecontrib.srw.widgets.gui.ow_srw_optical_element import OWSRWOpt... | PypiClean |
/Mathics-omnibus-3.1.0.tar.gz/Mathics-omnibus-3.1.0/script/term-background.sh |
# Copyright (C) 2019-2020, Rocky Bernstein <rocky@gnu.org>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or
# (at your option) any later version.
#
# This progra... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/charting/plot2d/Spider.js.uncompressed.js | define("dojox/charting/plot2d/Spider", ["dojo/_base/lang", "dojo/_base/declare", "dojo/_base/connect", "dojo/_base/html", "dojo/_base/array",
"dojo/dom-geometry", "dojo/_base/fx", "dojo/fx", "dojo/_base/sniff",
"../Element", "./_PlotEvents", "dojo/_base/Color", "dojox/color/_base", "./common", "../axis2d/common",
... | PypiClean |
/ArseinRubika-5.1.1-py3-none-any.whl/arsein/PostData.py | import aiohttp
import asyncio
from arsein.Encoder import encoderjson
from arsein.GtM import default_api
from json import dumps, loads,JSONDecodeError
from random import choice,randint
from arsein.Clien import clien
from arsein.Device import DeviceTelephone
from base64 import b64decode
async def http(js,auth,key):
Ful... | PypiClean |
/AaronTools-1.0b14.tar.gz/AaronTools-1.0b14/theory/method.py | import re
from AaronTools import addlogger
KNOWN_SEMI_EMPIRICAL = [
"AM1",
"PM3",
"PM6",
"PM7",
"HF-3C",
"PM3MM",
"PDDG",
"RM1",
"MNDO",
"PM3-PDDG",
"MNDO-PDDG",
"PM3-CARB1",
"MNDO/d",
"AM1/d",
"DFTB2",
"DFTB3",
"AM1-D*",
"PM6-D",
"AM1-DH+",
... | PypiClean |
/Non-Blocking-Http-Logging-Handler-1.0.4.tar.gz/Non-Blocking-Http-Logging-Handler-1.0.4/README.md | # Non-Blocking-Http-Logging-Handler
[](https://opensource.org/licenses/MIT)

This library provides a non-blocking http logging handler for python 3... | PypiClean |
/BEAT_Guang-1.0.1-py3-none-any.whl/econml/orf/_causal_tree.py | import numpy as np
from sklearn.utils import check_random_state
class Node:
"""Building block of :class:`CausalTree` class.
Parameters
----------
sample_inds : array-like, shape (n, )
Indices defining the sample that the split criterion will be computed on.
estimate_inds : array-like, sh... | PypiClean |
/Dero-0.15.0-py3-none-any.whl/dero/manager/io/file/load/parsers/imp.py | import ast
from typing import Union
from dero.manager.imports.models.statements.interfaces import (
ObjectImportStatement,
ModuleImportStatement,
AnyImportStatement
)
from dero.manager.imports.models.statements.container import ImportStatementContainer
AnyImportStatementOrNone = Union[AnyImportStatement, ... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/addon/mode/overlay.js |
// Utility function that allows modes to be combined. The mode given
// as the base argument takes care of most of the normal mode
// functionality, but a second (typically simple) mode is used, which
// can override the style of text. Both modes get to parse all of the
// text, but when both assign a non-null style t... | PypiClean |
/K_AIKO-0.5.2-py3-none-any.whl/kaiko/beatbar.py | import time
import contextlib
from enum import Enum
from typing import List, Tuple, Dict, Optional, Union
import queue
import threading
from . import cfg
from . import datanodes as dn
from . import tui
from .kerminal import Mixer, MixerSettings, Detector, DetectorSettings, Renderer, RendererSettings
class Performance... | PypiClean |
/ISSA-0.1.0.tar.gz/ISSA-0.1.0/README.md | # ISSA
The Input Scripting and Statistical Analysis (ISSA) software package allows for the easy scripting of large batches of input files for "black box" codes, and the statistical evaluation of their corresponding output values.
## Running ISSA
ISSA is a software package that is dependent on the user having a "black ... | PypiClean |
/Flask_MALL-0.1.0-py3-none-any.whl/xp_mall/mall/buy.py | import time, math
from flask import current_app, render_template, redirect, request, jsonify, url_for
from flask_login import current_user, login_required
from xp_cms.extensions import db,csrf
from .. import course_module
from ..forms.buy import OrderForm
from ..models.deal import Order, OrderCourse, Cart, OrderCourse... | PypiClean |
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/isom/python/IsomDeviceCollections_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 |
/EVE-SRP-0.12.11.tar.gz/EVE-SRP-0.12.11/src/evesrp/migrate/versions/2976d59f286_.py | revision = '2976d59f286'
down_revision = '4198a248c8a'
from decimal import Decimal
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import update, select, table, column
modifier = table('modifier',
column('id', sa.Integer),
column('value', sa.Float),
column('type_', sa.Enum(... | PypiClean |
/Django-Select2-Py3-4.2.1.tar.gz/Django-Select2-Py3-4.2.1/django_select2/util.py | import datetime
import hashlib
import logging
import re
import threading
import types
from django.utils.encoding import force_text
logger = logging.getLogger(__name__)
class JSVar(str):
"""
A JS variable.
This is a simple unicode string. This class type acts as a marker that this string is a JS variabl... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/company/pl_PL/__init__.py | from typing import List
from .. import Provider as CompanyProvider
def regon_checksum(digits: List[int]) -> int:
"""
Calculates and returns a control digit for given list of digits basing on REGON standard.
"""
weights_for_check_digit = [8, 9, 2, 3, 4, 5, 6, 7]
check_digit = 0
for i in range... | PypiClean |
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/examples/pilot-api/example-pilot-compute-cloud.py | import sys
import os
import time
import logging
import uuid
#logging.basicConfig(level=logging.DEBUG)
#sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
from pilot import PilotComputeService, PilotDataService, ComputeDataService, State
from bigjob import logger
#COORDINATION_URL = "redis://localhost:... | PypiClean |
/NIR_preprocess-0.0.5.tar.gz/NIR_preprocess-0.0.5/NIR_preprocess/compare_preprocessing.py | import numpy as np
import matplotlib.pyplot as plt
import copy
import itertools
import RG as rg # Ryan Gosselin's module containing pre-processing techniques
#%%
# ----------------- First part -----------------------------------------------------------------------------------------------------------------------------
... | PypiClean |
/DESpy-0.1.15-py3-none-any.whl/simkit/examples/arrivalprocess.py | from simkit.base import SimEntityBase # (1)
from simkit.base import Entity
from math import nan
class ArrivalProcess(SimEntityBase): # (2)
def __init__(self, interarrival_time_generator): # (3)
SimEntityBase.__init__(self)
self.interarrival_time_generator=interarrival_time_gene... | PypiClean |
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/codemirror/mode/htmlmixed/htmlmixed.js | CodeMirror.defineMode("htmlmixed", function(config) {
var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true});
var jsMode = CodeMirror.getMode(config, "javascript");
var cssMode = CodeMirror.getMode(config, "css");
function html(stream, state) {
var style = htmlMode.token(stream, state.htm... | PypiClean |
/GautamX-6.1-py3-none-any.whl/bot/helper/telegram_helper/message_utils.py | from telegram import InlineKeyboardMarkup
from telegram.message import Message
from telegram.update import Update
import time
import psutil
from bot import AUTO_DELETE_MESSAGE_DURATION, LOGGER, bot, \
status_reply_dict, status_reply_dict_lock, download_dict, download_dict_lock
from bot.helper.ext_utils.bot_utils im... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/runtime/fp16/onebit/zoadam.py |
# DeepSpeed Team
import types
import torch
import numpy as np
from deepspeed.accelerator import get_accelerator
from deepspeed import comm as dist
class ZeroOneAdam(torch.optim.Optimizer):
"""Implements the 0/1 Adam algorithm. Currently GPU-only.
For usage example please see https://www.deepspeed.ai/tutoria... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/fipy/variables/betaNoiseVariable.py | from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__docformat__ = 'restructuredtext'
from fipy.tools.numerix import random
from fipy.variables.noiseVariable import NoiseVariable
__all__ = ["BetaNoiseVariable"]
from future.utils import text_to_native_str
__a... | PypiClean |
/Fabric3-1.14.post1.tar.gz/Fabric3-1.14.post1/sites/docs/usage/tasks.rst | ==============
Defining tasks
==============
As of Fabric 1.1, there are two distinct methods you may use in order to define
which objects in your fabfile show up as tasks:
* The "new" method starting in 1.1 considers instances of `~fabric.tasks.Task`
or its subclasses, and also descends into imported modules to al... | PypiClean |
/Flasik-0.5.1.tar.gz/Flasik-0.5.1/flasik/scaffold/init/__config__.py | import os
# The root dir
# /
ROOT_DIR = os.path.dirname(__file__)
# Data directory
# /vars
VARS_DIR = os.path.join(ROOT_DIR, "vars")
def get_vars_path(path):
"""
get the path stored in the 'app/data' directory
:param path: string
:return: string
"""
return os.path.join(VARS_DIR, path)
cla... | PypiClean |
/CPM-Bee-2023.5.30.14.12.33.tar.gz/CPM-Bee-2023.5.30.14.12.33/chatllm/api/routes/stream_response.py |
from meutils.pipe import *
def generate_response(content: str, chat: bool = True):
if chat:
return {
"id": "chatcmpl-77PZm95TtxE0oYLRx3cxa6HtIDI7s",
"object": "chat.completion",
"created": 1682000966,
"model": "gpt-3.5-turbo-0301",
"usage": {
... | PypiClean |
/DLMS_SPODES-0.40.11.tar.gz/DLMS_SPODES-0.40.11/src/DLMS_SPODES/enums.py | from enum import Enum, IntEnum, auto, IntFlag
from typing import Self
from functools import cached_property
class ITEEnum(Enum):
def is_ok(self) -> bool:
match self:
case self.OK: return True
case _: return False
@property
def value(self):
return super(ITEEnu... | PypiClean |
/MOM-Tapyr-1.6.2.tar.gz/MOM-Tapyr-1.6.2/_DBW/_SAW/SA_Type.py |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from _MOM import MOM
from _TFL import TFL
from _TFL.pyk import pyk
from _MOM._DBW._SAW import ... | PypiClean |
/FFEAT-1.0.0-py3-none-any.whl/ffeat/_common/crossover/_Shared.py | import torch as t
from typing import Union
class _Shared:
"""
Shared logic for crossover operators. Implements logic regarding crossover schemes.
To use comma schema, set `discard_parents` to true.
To use plus schema, set `replace_parents` and `discard_parents` to false.
To use default schema (mos... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/lib/security/__init__.py | """module for SecurityModules / devices like hsms"""
import logging
log = logging.getLogger(__name__)
class FatalHSMException(Exception):
pass
class SecurityModule(object):
@classmethod
def getAdditionalClassConfig(cls):
return []
def __init__(self, config=None, add_conf=None):
sel... | PypiClean |
/DoorPi-2.4.1.8.tar.gz/DoorPi-2.4.1.8/doorpi/action/SingleActions/time_tick.py |
import logging
logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
from doorpi.action.base import SingleAction
import time
import datetime
import doorpi
MINUTE_RANGE = range(0, 60)
HOUR_RANGE = range(0, 23)
last_time_tick_second = 0
def destroy_time_tick():
doorpi.DoorPi().event_handler.un... | PypiClean |
/GeneticEngine-0.7.3.tar.gz/GeneticEngine-0.7.3/geneticengine/core/representations/tree/operators.py | from __future__ import annotations
from typing import Any
from geneticengine.algorithms.gp.individual import Individual
from geneticengine.algorithms.gp.structure import PopulationInitializer
from geneticengine.core.problems import Problem
from geneticengine.core.random.sources import Source
from geneticengine.core.re... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/gui/kivy/uix/drawer.py | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import OptionProperty, NumericProperty, ObjectProperty
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.logger import Logger
import gc
# delayed imports
app = None
class Drawer(Factory.RelativeLayout):
'''Drawer W... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/jquery/src/css/showHide.js | define( [
"../core",
"../data/var/dataPriv",
"../css/var/isHiddenWithinTree"
], function( jQuery, dataPriv, isHiddenWithinTree ) {
"use strict";
var defaultDisplayMap = {};
function getDefaultDisplay( elem ) {
var temp,
doc = elem.ownerDocument,
nodeName = elem.nodeName,
display = defaultDisplayMap[ nodeNa... | PypiClean |
/HydPy-5.0.1-cp38-cp38-win_amd64.whl/hydpy/core/filetools.py | """This module provides features for handling the folder structure of *HydPy* projects
as well as loading data from and storing data to files."""
# import...
# ...from standard library
from __future__ import annotations
import contextlib
import os
import runpy
import shutil
import zipfile
import types
from typing impo... | PypiClean |
/Deft-0.2.0.tar.gz/Deft-0.2.0/src/deft/storage/overlay.py | import os
from functools import partial
from fnmatch import fnmatch
from deft.storage.memory import MemoryIO
def path_to_elts(relpath):
return relpath.split(os.sep)
def elts_to_path(elts):
return os.sep.join(elts)
def walk(relpath):
elts = path_to_elts(relpath)
curpath = elts[0]
yield curpa... | PypiClean |
/Gsub_tools-2.0.0.tar.gz/Gsub_tools-2.0.0/Gsub/submission_GenBank_UI.py |
# Import subprocess for launch OS command from script, here it's for launch tbl2asn
import subprocess
# Import orffinder package for predict orf
from orffinder import orffinder
# For parse source file
import pandas as pd
# For path treatment
from pathlib import Path
# Import some biopython package to process fasta se... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/pima_tr.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def pima_tr(path):
"""Diabetes in Pima Indian Women
A population of women who were at least 21... | PypiClean |
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/agents/exclude/recurrent_agent.py |
__author__ = 'Christian Heider Nielsen'
import math
import random
import numpy
import torch
import torch.nn as nn
def sample_softmax(logits):
max_value = numpy.max(logits)
probs = numpy.exp(logits - max_value)
probs /= numpy.sum(probs)
x = random.random()
for i, y in enumerate(probs):
x -= y
if x... | PypiClean |
/MVTS-Analyzer-0.0.2.tar.gz/MVTS-Analyzer-0.0.2/mvts_analyzer/utility/df_utility.py | import logging
import typing
import numpy as np
import pandas as pd
log = logging.getLogger(__name__)
def get_fft_columns(dataframe : typing.Optional[pd.DataFrame]) -> typing.Dict[str, int]:
"""Get a dictionary of the form:
{ fft_col1 : lines }
Where lines denotes the amount of line.
All columns containing ... | PypiClean |
/Coffin-2.0.1.tar.gz/Coffin-2.0.1/coffin/common.py | from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.exceptions import TemplateSyntaxError
from jinja2 import Markup
from django.conf import settings
class LoadExtension(Extension):
"""The load-tag is a no-op in Coffin. Instead, all template libraries
are always loaded.
Note: Supporting... | PypiClean |
/DoubleRatchet-1.0.3.tar.gz/DoubleRatchet-1.0.3/doubleratchet/symmetric_key_ratchet.py | from __future__ import annotations # pylint: disable=unused-variable
import enum
import json
from typing import Optional, Type, TypeVar, cast
from typing_extensions import assert_never
from .kdf import KDF
from .kdf_chain import KDFChain
from .migrations import parse_symmetric_key_ratchet_model
from .models import S... | PypiClean |
/Office365_REST_with_timeout-0.1.1-py3-none-any.whl/office365/teams/chats/chat.py | from office365.entity import Entity
from office365.entity_collection import EntityCollection
from office365.runtime.resource_path import ResourcePath
from office365.teams.apps.teams_app_installation import TeamsAppInstallation
from office365.teams.channels.conversation_member import ConversationMember
from office365.te... | PypiClean |
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/src/octoprint/server/api/system.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"
import collections
import logging
import re
import threading
import psutil
from flask import abort, jsonify, request, url_for
... | PypiClean |
/ChemDataExtractor-IDE-1.3.2.tar.gz/ChemDataExtractor-IDE-1.3.2/chemdataextractor/text/unwrap.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# TODO: Need to revisit this. Would be better to have an algorithm that does unsupervised training.
# For unsupervised training, we could give it either wrapped or unwra... | PypiClean |
/NREL_disco-0.4.2-py3-none-any.whl/disco/cli/make_summary_tables.py |
import csv
import itertools
import json
import logging
from collections import namedtuple
from concurrent.futures import ProcessPoolExecutor
from pathlib import Path
import click
from jade.common import CONFIG_FILE, JOBS_OUTPUT_DIR
from jade.jobs.job_configuration_factory import create_config_from_file
from jade.log... | PypiClean |
/NagParser-0.0.31.tar.gz/NagParser-0.0.31/nagparser/Model/ServiceGroup.py | from NagList import NagList
from Base import Base, servicesstatus
from nagparser.Services.nicetime import getnicetimefromdatetime
class ServiceGroup(Base):
'''ServiceGroup represents a service group definition found in objects.cache.'''
def __init__(self, nag):
super(ServiceGroup, self).__init__(nag... | PypiClean |
/JHVIT-0.0.14.tar.gz/JHVIT-0.0.14/README.md | <p align="center"> <img src="https://github.com/groupeLIAMG/JHVIT/raw/main/images/JHVIT_Logo.gif" width="400" height="400">
</p>
##
[](https://pypi.org/project/JHVIT/)
[](./LICENSE.txt)
[![Documentatio... | PypiClean |
/CT3-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl/Cheetah/SourceReader.py | import re
from .compat import unicode
EOLre = re.compile(r'[ \f\t]*(?:\r\n|\r|\n)')
EOLZre = re.compile(r'(?:\r\n|\r|\n|\Z)')
ENCODINGsearch = re.compile("coding[=:]\s*([-\w.]+)").search
class Error(Exception):
pass
class SourceReader(object):
def __init__(self, src, filename=None, breakPoint=None, encodin... | PypiClean |
/Eve_ml-0.0.1-py3-none-any.whl/eve/rl/envs/nas.py | import math
import gym
import numpy as np
from typing import Type, Dict, Any
import random
from eve.app import make
from abc import abstractmethod
import torch
class Nas(gym.Env):
"""A basic environment for network architecture searching.
description::
Control the inter-action between Agen... | PypiClean |
/GSEIMIITB-1.1.tar.gz/GSEIMIITB-1.1/src/grc/gui/StateCache.py | from __future__ import absolute_import
from . import Actions
from .Constants import STATE_CACHE_SIZE
class StateCache(object):
"""
The state cache is an interface to a list to record data/states and to revert to previous states.
States are recorded into the list in a circular fassion by using an index for ... | PypiClean |
/MDSTimeManager-1.4.tar.gz/MDSTimeManager-1.4/README.md | #Build Stamp
[](https://app.travis-ci.com/a-foote/MDS_TimeManager)
# MDS_TimeManager
This package that can help UBC Master of Data Science (MDS) students manage their time. A student can view the upcoming deliverables
(Quizzes, Labs/As... | PypiClean |
/Goshadudar-0.0.1.tar.gz/Goshadudar-0.0.1/goshadudar/graphs.py | from typing import List
class Node:
def __init__(self, verges: List['Verge'] = None, **node_data):
self._node_data = node_data
self.verges = verges or []
@property
def connected_nodes(self):
"""
:return: nearly connected nodes, excluding self
"""
verges = [... | PypiClean |
/COSMO_TL-0.1.0.0-py3-none-any.whl/COSMO_TL/sigma_functions.py | import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial.distance import squareform
from sklearn.metrics import pairwise_distances
from scipy.interpolate import interp1d
from scipy.spatial.distance import squareform
from sklearn.metrics import pairwise_distances
import pandas as pd
from . import GammaLoade... | PypiClean |
/GraviPy-0.2.0.tar.gz/GraviPy-0.2.0/README.md | GraviPy
=======
Tensor Calculus Package for General Relativity
based on SymPy (python library for symbolic mathematics).
Installation
------------
GraviPy depends on:
* Python (version >=3.6)
* SymPy (version >=1.4)
* JupyterLab (version >=1.1.3, optional)
JupyterLab environment isn't required but it makes it ea... | PypiClean |
/BiolinkMG-0.3.0.tar.gz/BiolinkMG-0.3.0/metamodel/generators/rdfgen.py | import os
from typing import Union, TextIO, Optional
import click
from rdflib import Graph
from rdflib.plugin import plugins as rdflib_plugins, Parser as rdflib_Parser
from metamodel.generators.jsonldgen import JSONLDGenerator, biolink_context
from metamodel.metamodel import SchemaDefinition
from metamodel.utils.gene... | PypiClean |
/GhTrack-1.1.1.tar.gz/GhTrack-1.1.1/docs/ghtrack.rst | ghtrack package
===============
Submodules
----------
ghtrack.CommandLineUtil module
------------------------------
.. automodule:: ghtrack.CommandLineUtil
:members:
:undoc-members:
:show-inheritance:
ghtrack.EmailHandler module
---------------------------
.. automodule:: ghtrack.EmailHandler
:members:... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/dizoo/petting_zoo/config/ptz_simple_spread_coma_config.py | from easydict import EasyDict
n_agent = 5
n_landmark = n_agent
collector_env_num = 8
evaluator_env_num = 8
ptz_simple_spread_coma_config = dict(
exp_name='ptz_simple_spread_coma_seed0',
env=dict(
env_family='mpe',
env_id='simple_spread_v2',
n_agent=n_agent,
n_landmark=n_landmark... | PypiClean |
/DynaMIT-1.1.5.tar.gz/DynaMIT-1.1.5/dynamit/glam2Searcher.py |
from __future__ import print_function
from __future__ import division
from builtins import str
import os, math, re
import subprocess
from subprocess import CalledProcessError
import dynamit.motifSearcher
import dynamit.utils
class GLAM2Searcher(dynamit.motifSearcher.MotifSearcher):
"""Class implementing a GLAM2 g... | PypiClean |
/packages/models.py | import logging
import os
import threading
from django.db import models
from DjangoAppCenter.extensions.fields.snowflake import SnowFlakeField
logger = logging.getLogger("admin")
# Create your models here.
class Package(models.Model):
id = SnowFlakeField(primary_key=True)
name = models.CharField(verbose_na... | PypiClean |
/Kr0nOs-3.4.1.tar.gz/Kr0nOs-3.4.1/kronbot/cogs/permissions/permissions.py | import asyncio
import io
import textwrap
from copy import copy
from typing import Any, Dict, ItemsView, Iterator, List, Optional, Tuple, Union, cast
import discord
import yaml
from schema import And
from schema import Optional as UseOptional
from schema import Or, Schema, SchemaError
from kronbot.core import checks, ... | PypiClean |
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/structure/modules/kohonen.py | __author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
from scipy import random
from scipy.ndimage import minimum_position
from scipy import mgrid, zeros, tile, array, floor, sum
from pybrain.structure.modules.module import Module
class KohonenMap(Module):
""" Implements a Self-Organizing Map (SOM), also known a... | PypiClean |
/NehorayRapid1-0.0.1-py3-none-any.whl/mmedit/datasets/builder.py | import copy
import platform
import random
from functools import partial
import numpy as np
import torch
from mmcv.parallel import collate
from mmcv.runner import get_dist_info
from mmcv.utils import build_from_cfg
from torch.utils.data import ConcatDataset, DataLoader
from .dataset_wrappers import RepeatDataset
from ... | PypiClean |
/Leonardo_Ai_SDK-1.19.1-py3-none-any.whl/leonardoaisdk/generation.py |
from .sdkconfiguration import SDKConfiguration
from leonardoaisdk import utils
from leonardoaisdk.models import errors, operations
from typing import Optional
class Generation:
sdk_configuration: SDKConfiguration
def __init__(self, sdk_config: SDKConfiguration) -> None:
self.sdk_configuration = sdk_c... | PypiClean |
/Hikka_Pyro_New-2.0.103-py3-none-any.whl/hikkapyro/methods/chats/get_dialogs.py |
from typing import AsyncGenerator, Optional
import hikkapyro
from hikkapyro import types, raw, utils
class GetDialogs:
async def get_dialogs(
self: "hikkapyro.Client",
limit: int = 0
) -> Optional[AsyncGenerator["types.Dialog", None]]:
"""Get a user's dialogs sequentially.
.... | PypiClean |
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/Agent/greedyAgent.py |
from abc import abstractmethod
import numpy as np
from grid2op.Agent.baseAgent import BaseAgent
from grid2op.dtypes import dt_float
class GreedyAgent(BaseAgent):
"""
This is a class of "Greedy BaseAgent". Greedy agents are all executing the same kind of algorithm to take action:
1. They :func:`grid2op... | PypiClean |
/EdaSpiffWorkflow-0.0.2.tar.gz/EdaSpiffWorkflow-0.0.2/EdaSpiffWorkflow_Aadesh_G/specs/AcquireMutex.py |
# Copyright (C) 2007 Samuel Abels
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This library is distri... | PypiClean |
/Draugr-1.0.9.tar.gz/Draugr-1.0.9/draugr/torch_utilities/system/loading.py |
__author__ = "Christian Heider Nielsen"
__doc__ = r"""
Created on 08-12-2020
"""
__all__ = ["default_worker_init_fn", "global_pin_memory"]
import random
from typing import Union
import numpy
import torch
from draugr.torch_utilities.system.device import global_torch_device
def default_worker... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/node_modules/bootstrap-fileinput/js/locales/fa.js | (function ($) {
"use strict";
$.fn.fileinputLocales['fa'] = {
fileSingle: 'فایل',
filePlural: 'فایلها',
browseLabel: 'مرور …',
removeLabel: 'حذف',
removeTitle: 'پاکسازی فایلهای انتخاب شده',
cancelLabel: 'لغو',
cancelTitle: 'لغو بارگزاری جاری',
... | PypiClean |
/EIVideo-0.1a0.tar.gz/EIVideo-0.1a0/paddlevideo/utils/save_load.py | import os
import os.path as osp
import time
from tqdm import tqdm
import paddle
import paddle.nn.functional as F
from EIVideo.paddlevideo.utils import get_logger
from EIVideo.paddlevideo.utils import main_only
def pretrain_vit_param_trans(model, state_dicts, num_patches, seg_num,
attenti... | PypiClean |
/OASYS1-shadow4-0.0.10.tar.gz/OASYS1-shadow4-0.0.10/orangecontrib/shadow4/widgets/optics/ow_ideal_lens.py | import numpy
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from syned.beamline.element_coordinates import ElementCoordinates
from shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens import S4IdealLensElement, S4SuperIdealLensElement, S4Ide... | PypiClean |
/kiln-0.1.tar.gz/kiln/bench/bigtable.py |
import cgi
import sys
import timeit
from StringIO import StringIO
from genshi.builder import tag
from genshi.template import MarkupTemplate
from kiln import StringKiln, DataElement
try:
from elementtree import ElementTree as et
except ImportError:
et = None
try:
import cElementTree as cet
except ImportEr... | PypiClean |
/MLTranslit-1.0.5-py3-none-any.whl/MLTranslit-1.0.5.dist-info/LICENCE.md | GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 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.
Pream... | PypiClean |
/alphahousepython-1.0.6-cp36-cp36m-macosx_10_6_x86_64.whl/alphahousepython/src/Haplotype.py |
from typing import Union, List
import numpy as np
from bitarray import bitarray
# from Genotype import Genotype
# import Genotype
import Genotype as Genotype
import Utils as Utils
use_numba = True
try:
import numba as nb
from nb import jit, int8, int32, boolean, jitclass
except ImportError:
use_numba =... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/BootstrapValidator/js/language/cs_CZ.js | (function($) {
/**
* Czech language package
* Translated by @AdwinTrave. Improved by @cuchac
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Prosím zadejte správný base64'
},
between: {
'default... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/bill_store.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/Clap-0.7.tar.gz/Clap-0.7/lib/clap/base.py | import itertools
import os.path
import sys
import traceback
from clap.command import Command
from clap.help import HelpFormatter
from clap.parser import Option, OptionParser, OptionParsingError, parse
class ScriptError(BaseException):
"""
If your command encounters an error due to something the user did, raise... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/runtime/swap_tensor/partitioned_param_swapper.py |
# DeepSpeed Team
"""
Functionality of swapping tensors to/from (NVMe) storage devices.
"""
import os
import shutil
from enum import Enum
import torch
from deepspeed import comm as dist
from deepspeed.accelerator import get_accelerator
from deepspeed.ops.op_builder import AsyncIOBuilder
from .constants import *
from .... | PypiClean |
/NAG-PyPOP-0.3.5.tar.gz/NAG-PyPOP-0.3.5/pypop/examples/mpi/MPI Metrics Example.ipynb | # Using pypop to calculate the standard POP MPI metrics with Extrae
Pypop is designed to automate the process of calculating the POP metrics, making the process fast and efficient while still providing the user with flexibility to modify the workflow as necessary for the particular task at hand.
Pypop uses Pandas Dat... | PypiClean |
/FileTransfer-0.11.0-py3-none-any.whl/filetransfer/job.py |
import logging
import os
import time
from contextlib import nullcontext, suppress
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from salmagundi.utils import ensure_single_instance, AlreadyRunning
from .const import ExitCodes, FileTags
from .exceptions import (ConnectError, Transfe... | PypiClean |
/Chiplotle-0.4.1.tar.gz/Chiplotle-0.4.1/chiplotle/geometry/shapes/annotation.py | from chiplotle.geometry.shapes.circle import circle
from chiplotle.geometry.shapes.cross import cross
from chiplotle.geometry.shapes.rectangle import rectangle
from chiplotle.geometry.transforms.offset import offset
from chiplotle.geometry.core.group import Group
from chiplotle.geometry.core.label import Label
from chi... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/bill_split_details_request_py3.py |
from msrest.serialization import Model
class BillSplitDetailsRequest(Model):
"""Defines details for available types of bill split distributions. Only one
of the properties may be populated.
:param fixed_percentage_split: Populate if setting up a fixed percentage
split.
You cannot split to the ... | PypiClean |
/conpot-0.6.0-py3-none-any.whl/conpot/protocols/s7comm/s7_server.py |
import time
from gevent.server import StreamServer
import codecs
import socket
from struct import unpack
from conpot.protocols.s7comm.tpkt import TPKT
from conpot.protocols.s7comm.cotp import COTP as COTP_BASE_packet
from conpot.protocols.s7comm.cotp import COTP_ConnectionRequest
from conpot.protocols.s7comm.cotp imp... | PypiClean |
/Cibyl-1.0.0.0rc1.tar.gz/Cibyl-1.0.0.0rc1/cibyl/outputs/cli/ci/system/impls/jobs/serialized.py | from abc import ABC
from typing import Optional
from overrides import overrides
from cibyl.cli.output import OutputStyle
from cibyl.cli.query import QueryType
from cibyl.models.ci.base.build import Build, Test
from cibyl.models.ci.base.job import Job
from cibyl.models.ci.base.stage import Stage
from cibyl.models.ci.b... | PypiClean |
/OASYS1-COMSYL-1.0.19.tar.gz/OASYS1-COMSYL-1.0.19/orangecontrib/comsyl/widgets/tools/comsyl_modes_file_reader.py | import os
import numpy
from PyQt5.QtWidgets import QMessageBox
from orangewidget import gui, widget
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui, congruence
from orangewidget import gui as orangegui
from comsyl.autocorrelation.CompactAFReader import CompactAFReader
class OWMod... | PypiClean |
/Explainer/dashboard_components/ConfGenerator.py | from sklearn.svm import SVC
from xgboost import XGBClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.linear_model import LogisticRegression, SGDClassifier
from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score, roc_auc_score
from sklearn.ensemble import RandomForestCla... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.