id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/fastapi_jsonapi-2.0.0.tar.gz/fastapi_jsonapi-2.0.0/fastapi_jsonapi/data_layers/tortoise_orm.py |
from typing import Any, Iterable, Optional, Tuple, Type
from tortoise.queryset import QuerySet
from fastapi_jsonapi.data_layers.base import BaseDataLayer
from fastapi_jsonapi.data_layers.filtering.tortoise_orm import FilterTortoiseORM
from fastapi_jsonapi.data_layers.sorting.tortoise_orm import SortTortoiseORM
from ... | PypiClean |
/Ibidas-0.1.26.tar.gz/Ibidas-0.1.26/ibidas/wrappers/tsv.py | import os
import csv
from logging import info, warning
import wrapper
from ..itypes import rtypes
from .. import ops
from ..constants import *
import python
from ..itypes import detector
from ..utils import nested_array, util
class TSVRepresentor(wrapper.SourceRepresentor):
def __init__(self, filename, dialect=F... | PypiClean |
/Conditor-0.0.3-py3-none-any.whl/conditor/__init__.py |
from __future__ import annotations
from typing import Any
import pathlib
import sys
import inspect
import collections.abc
import json
import conditor.project
class Context :
"""Provides an environment to access conditor resources."""
def __init__(self, parent:Context|None=None, extend_attributes:dict[str... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/addon/search/searchcursor.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 |
/Hikka_Pyro-2.0.66-py3-none-any.whl/pyrogram/methods/chats/add_chat_members.py |
from typing import Union, List
import pyrogram
from pyrogram import raw
class AddChatMembers:
async def add_chat_members(
self: "pyrogram.Client",
chat_id: Union[int, str],
user_ids: Union[Union[int, str], List[Union[int, str]]],
forward_limit: int = 100
) -> bool:
""... | PypiClean |
/EUKulele-2.0.0.tar.gz/EUKulele-2.0.0/docs/source/EUKulele_read_breakdown.ipynb | # Using RNA read counts
### Using EUKelele to assign protistan taxonomy and generate relative community community based on RNA read counts
```
import pandas as pd
```
When working with an environmental transcriptomic data set, we often want to assign taxonomy using reference databases populated with cultured isolates... | PypiClean |
/GxSphinx-1.0.0.tar.gz/GxSphinx-1.0.0/doc/usage/restructuredtext/directives.rst | .. highlight:: rst
==========
Directives
==========
:ref:`As previously discussed <rst-directives>`, a directive is a generic block
of explicit markup. While Docutils provides a number of directives, Sphinx
provides many more and uses directives as one of the primary extension
mechanisms.
See :doc:`/usage/restructur... | PypiClean |
/Destipy-0.1.14.tar.gz/Destipy-0.1.14/destipy/endpoints/forum.py | from destipy.utils.http_method import HTTPMethod
from destipy.utils.requester import Requester
class Forum:
"""Forum endpoints."""
def __init__(self, requester, logger):
self.requester: Requester = requester
self.logger = logger
self.FORUM_URL = "https://www.bungie.net/Platform/Forum/"... | PypiClean |
/GelReportModels-7.8.0.tar.gz/GelReportModels-7.8.0/protocols/util/avro_schema.py | import json
__author__ = 'antonior'
class AvroSchemaFile:
def __init__(self, filename):
self.filename = filename
self.data = json.load(open(self.filename))
def get_external_reference(self, field_name):
external_file = self.filename.split('/')[:-1]
external_file.append(field_n... | PypiClean |
/CC-CataLog-0.1.330.tar.gz/CC-CataLog-0.1.330/catalog/gui/plotly_viewer.py | import typing as typ
#External imports
from PyQt5 import QtWebEngineWidgets, QtGui, QtWidgets, QtCore # type: ignore
import ase # type: ignore
from ase.visualize import view # type: ignore
import os
#Internal Imports
from catalog.misc.... | PypiClean |
/dragonflow-4.0.0.tar.gz/dragonflow-4.0.0/doc/source/specs/nb_api_refactor.rst | ..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
http://creativecommons.org/licenses/by/3.0/legalcode
=========================
North Bound Code Refactor
=========================
In this spec we will discuss the North Bound API, and how we want it to look.
More specifically, w... | PypiClean |
/Hemp-0.1.9.tar.gz/Hemp-0.1.9/README.rst | Hemp
=====
Environment aware configuration and tools for `Fabric <http://www.fabfile.org>`_.
.. image:: https://img.shields.io/pypi/v/Hemp.svg?style=flat-square :target: https://pypi.python.org/pypi/Hemp
.. image:: https://img.shields.io/pypi/l/Hemp.svg?style=flat-square :target: https://pypi.python.org/pypi/Hemp... | PypiClean |
/GenIce2-2.1.7.1.tar.gz/GenIce2-2.1.7.1/genice2/lattices/Struct64.py | from genice2.cell import cellvectors
import genice2.lattices
desc = {"ref": {"SpaceFullerene": 'Sikiric 2010'},
"usage": "No options available.",
"brief": "A space fullerene."
}
class Lattice(genice2.lattices.Lattice):
def __init__(self):
self.pairs = """
104 202
1 ... | PypiClean |
/Nikola-8.2.4-py3-none-any.whl/nikola/hierarchy_utils.py |
# Copyright © 2012-2023 Roberto Alsina and others.
# 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, mer... | PypiClean |
/FicusFramework-3.1.0.post2.tar.gz/FicusFramework-3.1.0.post2/src/schedule/TaskThreadHolder.py | import json
import logging
from munch import Munch
from schedule.TaskThread import TaskThread
from libs.utils import stop_thread
__actor_port = 8011
__task_thread_cache = dict()
log = logging.getLogger('Ficus')
def registry_task_thread(task_id: int, handler, remove_old_reason: str):
"""
注册一个任务线程
:p... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap/site/content/docs/5.0/forms/range.md | ---
layout: docs
title: Range
description: Use our custom range inputs for consistent cross-browser styling and built-in customization.
group: forms
toc: true
---
## Overview
Create custom `<input type="range">` controls with `.form-range`. The track (the background) and thumb (the value) are both styled to appear th... | PypiClean |
/Flask_Mpesa-1.2.8-py3-none-any.whl/flask_mpesa/api/transaction_status.py | import requests
from .auth import MpesaBase
class TransactionStatus(MpesaBase):
def __init__(self, env="sandbox", app_key=None, app_secret=None, sandbox_url=None, live_url=None):
MpesaBase.__init__(self, env, app_key, app_secret,
sandbox_url, live_url)
self.authenticatio... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Beam/FC/Environment/BeamPrediction.py | import os
import sys
import numpy as np
# Working session imports
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from BeamTraining import BeamTraining, p_grid
class BeamPrediction(BeamTraining):
def __init__(self,
as_tcp_ip_client=True,
instance_id=1,
... | PypiClean |
/Hystrix-Box-0.2.tar.gz/Hystrix-Box-0.2/README.md | <h1 align="center">
<a href="https://github.com/zomry1/Hystrix-Box">
<img src="https://user-images.githubusercontent.com/13539354/78783362-2fb5c980-79ac-11ea-95af-fb239aeed765.png" width='400' title="LOGO" alt="LOGO"></a>
</h1>
<h4 align="center"> Ultimate toolbox for solving CTF challenges 👨💻</h4>
<p ... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/api_client.py | import json
import atexit
import mimetypes
from multiprocessing.pool import ThreadPool
import io
import os
import re
import typing
from urllib.parse import quote
from urllib3.fields import RequestField
from firefly_iii_client import rest
from firefly_iii_client.configuration import Configuration
from firefly_iii_clie... | PypiClean |
/InternetArgumentCorpus-1.0.1.tar.gz/InternetArgumentCorpus-1.0.1/iacorpus/utilities/misc/itertools_recipes.py |
from itertools import *
import collections, random, operator
#nwise not in recipes, based on pairwise
def nwise(iterable, n):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
copies = tee(iterable, n)
for index in range(1, len(copies)):
for i in range(index):
next(copies[index], None)
return... | PypiClean |
/Gears-0.7.2.tar.gz/Gears-0.7.2/gears/asset_handler.py |
from functools import wraps
from subprocess import Popen, PIPE
class AssetHandlerError(Exception):
pass
class BaseAssetHandler(object):
"""Base class for all asset handlers (processors, compilers and
compressors). A subclass has to implement :meth:`__call__` which is called
with asset as argument.
... | PypiClean |
/CocoPy-1.1.0rc.zip/CocoPy-1.1.0rc/README.txt | !!!PLEASE NOTE!!!
This distribution is a release candidate.
Setup and usage information can be found in section 3 of
documentation/CocoDoc.htm. CocoDoc.htm contains everything you need to
use Coco for Python.
This file contains a list of the contents of the distribution and a
development roadmap.
CONTENTS OF THIS ... | PypiClean |
/OBP_reliability_pillar-0.2.0.tar.gz/OBP_reliability_pillar-0.2.0/OBP_reliability_pillar/__init__.py | import datetime
import boto3
import pytz
from boto3 import session
from OBP_reliability_pillar.cloudwatch import cloudwatch
from OBP_reliability_pillar.dynamodb import dynamodb
from OBP_reliability_pillar.elastic_beanstalk import elastic_beanstalk
from OBP_reliability_pillar.elastic_load_balancer import elb
from OBP_... | PypiClean |
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/GetDiskOperationREDFISH.py |
import argparse
import getpass
import json
import logging
import re
import requests
import sys
import time
import warnings
from pprint import pprint
warnings.filterwarnings("ignore")
parser = argparse.ArgumentParser(description="Python script using Redfish API DMTF to get check a disk if any operations are in progr... | PypiClean |
/MPInterfaces_Latest-2.0.3.tar.gz/MPInterfaces_Latest-2.0.3/examples/workflows/lammps_workflow.py |
from __future__ import division, print_function, unicode_literals, \
absolute_import
"""
Sample LAMMPS workflow that runs MD calculations for a bunch of structures and
subsequently generate their phasediagram.
"""
from math import ceil
import matplotlib
matplotlib.use('Agg')
from pymatgen.core.composition im... | PypiClean |
/EModelRunner-1.1.16.tar.gz/EModelRunner-1.1.16/emodelrunner/create_cells.py |
# Copyright 2020-2022 Blue Brain Project / EPFL
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... | PypiClean |
/NESTML-5.3.0-py3-none-any.whl/pynestml/meta_model/ast_while_stmt.py |
from pynestml.meta_model.ast_block import ASTBlock
from pynestml.meta_model.ast_expression import ASTExpression
from pynestml.meta_model.ast_node import ASTNode
class ASTWhileStmt(ASTNode):
"""
This class is used to store a new while-block.
Grammar:
whileStmt : 'while' expr BLOCK_OPEN block BLOCK... | PypiClean |
/Finance-JindowinData-0.0.7.tar.gz/Finance-JindowinData-0.0.7/jdwdata/DataAPI/mg/kn/kn_engine.py | import warnings
from datetime import date
from jdwdata.kdutils.singleton import Singleton
from ..fetch_engine import FetchEngine
try:
from ultron.tradingday import *
except ImportError:
warnings.warn(
"If you need high-performance computing, please install Finance-Ultron.First make sure that the C++ com... | PypiClean |
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/runtime/zero/mics_utils.py |
# DeepSpeed Team
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import os
from dataclasses import dataclass
from typing import List
import numpy as np
import torch
from torch import Tensor
from deepspeed import comm as dist
from deepspeed.accelerator impo... | PypiClean |
/CodeMetaPy-2.5.0.tar.gz/CodeMetaPy-2.5.0/codemeta/parsers/rust.py | import sys
import tomlkit
from rdflib import Graph, URIRef, BNode, Literal
from rdflib.namespace import RDF #type: ignore
from typing import Union, IO
from codemeta.common import (
AttribDict,
add_triple,
CODEMETA,
add_authors,
SDO,
COMMON_SOURCEREPOS,
SOFTWARETYPES,
generate_uri,
)
de... | PypiClean |
/django-chuck-0.2.3.tar.gz/django-chuck/modules/django-cms/project/apps/filer/admin/forms.py | from django import forms
from django.db import models
from django.contrib.admin import widgets
from filer.utils.files import get_valid_filename
from django.utils.translation import ugettext as _
from django.core.exceptions import ValidationError
from django.conf import settings
if 'cmsplugin_filer_image' in settings.... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/aerodynamics/aero_2D/airfoil_optimizer/airfoil_optimizer.py | import aerosandbox.numpy as np
from aerosandbox.geometry import Airfoil
from aerosandbox.geometry.airfoil.airfoil_families import get_kulfan_coordinates
from scipy import optimize
import matplotlib.pyplot as plt
import aerosandbox.tools.pretty_plots as p
if __name__ == '__main__':
### Design Conditions
Re_des... | PypiClean |
/Nitrous-0.9.3-py3-none-any.whl/turbogears/i18n/data/el_GR.py |
languages={'el': u'\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac', 'en': u'\u0391\u03b3\u03b3\u03bb\u03b9\u03ba\u03ac', 'zh': u'\u039a\u03b9\u03bd\u03b5\u03b6\u03b9\u03ba\u03ac', 'ca': u'\u039a\u03b1\u03c4\u03b1\u03bb\u03b1\u03bd\u03b9\u03ba\u03ac', 'it': u'\u0399\u03c4\u03b1\u03bb\u03b9\u03ba\u03ac', 'ar': u'\u039... | PypiClean |
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/htdocs/static/djblets/js/forms/models/conditionChoiceModel.es6.7a1f47085257.js | Djblets.Forms.ConditionChoice = Backbone.Model.extend({
defaults: {
name: null,
valueField: null
},
/**
* Initialize the choice.
*
* Attributes:
* operators (Array):
* The list of operators to populate the operators collection.
*/
initialize(att... | PypiClean |
/BRAILS-3.0.1.tar.gz/BRAILS-3.0.1/brails/modules/GarageDetector/lib/utils/sync_batchnorm/comm.py |
import queue
import collections
import threading
__all__ = ['FutureResult', 'SlavePipe', 'SyncMaster']
class FutureResult(object):
"""A thread-safe future implementation. Used only as one-to-one pipe."""
def __init__(self):
self._result = None
self._lock = threading.Lock()
self._con... | PypiClean |
/GrADim-0.0.5.tar.gz/GrADim-0.0.5/README.md | # cs107-FinalProject
Final project deliverables
Group #5
Gregoire Baverez
Xinrong Yang
Aloysius Lim
Shivam Raval
### Broader Impact and Inclusivity Statement
As we design this software, our intention is to contribute to the community, by providing an easier way to perform differentiation. Despite our well-intention,... | PypiClean |
/CrossPy-0.0.0a0.tar.gz/CrossPy-0.0.0a0/crosspy/device/__init__.py | from enum import Enum
from functools import lru_cache
from typing import Optional, List, Mapping, Dict, Iterable
from abc import ABCMeta, abstractmethod
import logging
from .detail import Detail
# from ..environments import EnvironmentComponentDescriptor
__all__ = [
"MemoryKind", "Memory", "Device", "Architectur... | PypiClean |
/GraKeL-0.1.9-cp310-cp310-macosx_10_9_universal2.whl/grakel/kernels/multiscale_laplacian.py | # Author: Ioannis Siglidis <y.siglidis@gmail.com>
# License: BSD 3 clause
# Python 2/3 cross-compatibility import
from __future__ import print_function
import warnings
import numpy as np
from numbers import Real
from math import exp
from sklearn.utils import check_random_state
from numpy.linalg import eig
from nump... | PypiClean |
/NikGapps-Helper-0.0.2.tar.gz/NikGapps-Helper-0.0.2/src/NikGapps_Helper/T.py | import math
import os
import time
from datetime import datetime
import pytz
from helper.P import P
class T:
def __init__(self):
self.t = time.time()
def taken(self, message=None):
start_time = self.t
P.yellow("---------------------------------------")
if message is not None... | PypiClean |
/BioSignalML-0.6.0a.tar.gz/BioSignalML-0.6.0a/biosignalml/model/__init__.py | __all__ = [ 'makelabel' ]
from .ontology import BSML
from .recording import Recording
from .signal import Signal
from .event import Event
from .segment import Segment
from .annotation import Annotation
def makelabel(label, suffix):
#============================
"""
Helper function to generate a m... | PypiClean |
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/packages/setuptools/command/egg_info.py | from distutils.filelist import FileList as _FileList
from distutils.errors import DistutilsInternalError
from distutils.util import convert_path
from distutils import log
import distutils.errors
import distutils.filelist
import os
import re
import sys
import io
import warnings
import time
import collections
from setup... | PypiClean |
/Destipy-0.1.14.tar.gz/Destipy-0.1.14/destipy/endpoints/user.py | from destipy.utils.http_method import HTTPMethod
from destipy.utils.requester import Requester
class User:
"""User endpoints."""
def __init__(self, requester, logger):
self.requester: Requester = requester
self.logger = logger
self.USER_URL = "https://www.bungie.net/Platform/User/"
... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/utils/celery.py | import os
from celery import Celery
from celery.signals import after_setup_logger, task_failure
from django.conf import settings
from django.core.checks import run_checks
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "weblate.settings")
app = Celer... | PypiClean |
/FRCUploader-3.6.2.tar.gz/FRCUploader-3.6.2/frcuploader/youtube.py |
try:
import http.client as httplib
except ImportError:
import httplib
import httplib2
import os
import sys
import errno
from time import sleep
from decimal import Decimal
from . import consts
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from googleapicli... | PypiClean |
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/flot/plugins/jquery.flot.drawSeries.js | (function($) {
"use strict";
function DrawSeries() {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy, ctx, steps) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null,
prevy = null;
var x1 = 0.0,
... | PypiClean |
/CrawlerCodePythonTools-Gui-1.4.0.tar.gz/CrawlerCodePythonTools-Gui-1.4.0/pythontools/gui/listwidget.py | from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import Qt
from pythontools.gui.object import Object
class ListWidget(Object):
def __init__(self, window):
super(ListWidget, self).__init__(window)
self.obj = QtWidgets.QListWidget(window.window)
self.obj.setContextMenuPolicy(Qt.C... | PypiClean |
/InstallIt-1.5.0-py3-none-any.whl/installit/installit.py | import logging
from pathlib import Path
import shutil
from termcolor import colored
from beetools import beearchiver, beeutils, beescript, beevenv
_PROJ_DESC = __doc__.split("\n")[0]
_PROJ_PATH = Path(__file__)
_PROJ_NAME = _PROJ_PATH.stem
class InstallIt:
'''Bright Edge eServices server installation tools
... | PypiClean |
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/_source/plugins/stylescombo/plugin.js | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
CKEDITOR.plugins.add( 'stylescombo',
{
requires : [ 'richcombo', 'styles' ],
init : function( editor )
{
var config = editor.config,
lang = edi... | PypiClean |
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/data/container.py | class IContainer(object):
"""A specialized set of identified Items. Basically the IContainer is a set
of L{Item}s, but it imposes certain constraints on its contents. These
constraints state the following:
- All Items in the IContainer must have the same number of Properties.
- All Items in the... | PypiClean |
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/agents/exclude/evolutionary/cma_agent.py | import time
from typing import Any, Tuple
from neodroidagent.agents.torch_agents.model_free.on_policy.evolutionary import EVOAgent
from tqdm import tqdm
import draugr
from neodroidagent.entry_points import session_entry_point
class CMAAgent(EVOAgent):
# region Private
def __defaults__(self) -> None:
self.... | PypiClean |
/Artur_serializer-0.1.0.tar.gz/Artur_serializer-0.1.0/Artur_serializer/serialiser.py | import inspect
import re
import types
from Artur_serializer.constants import BASE_TYPES, SIMILAR_COLLECTIONS, CODE_PROPERTIES, BASE_COLLECTIONS, CLASS_PROPERTIES, TYPESES, \
METHODS
def serialize(obj):
# Serialising of base types
if isinstance(obj, tuple(BASE_TYPES.values())):
return serialize_b... | PypiClean |
/OASYS1-ShadowOui-1.5.210.tar.gz/OASYS1-ShadowOui-1.5.210/orangecontrib/shadow/util/scanning_gui.py |
import copy, numpy
from PyQt5.QtWidgets import QWidget, QVBoxLayout
from PyQt5.QtCore import Qt
from matplotlib import cm, rcParams
from oasys.widgets.gui import FigureCanvas3D
from matplotlib.figure import Figure
from matplotlib.collections import LineCollection
from matplotlib.colors import colorConverter, ListedC... | PypiClean |
/1to001-0.3.0.tar.gz/1to001-0.3.0/README.rst | ======
1to001
======
*1to001* is made for padding numbers in filenames automatically. It's written in Python 3.
Installation
============
System-wide installation:
.. code:: sh
$ pip install 1to001
User installation:
.. code:: sh
$ pip install --user 1to001
For development code:
.. code:: sh
$ pip ins... | PypiClean |
/AutoDifferentiate-1.0.1.tar.gz/AutoDifferentiate-1.0.1/AutoDiff/optimize.py | from AutoDiff.ForwardAD import Var, MultiFunc
import numpy as np
import types
def optimize(func, initial_guess, tolerance = 10e-6, solver = 'BFGS', max_iter = 100,
gd_lr = 0.1):
"""
Returns the values for the elements in var_list that minimize function func.
The optimization proble... | PypiClean |
/Cardiac_eXplainableAI_CXAI-0.0.3-py3-none-any.whl/CXAI/CXAI_CAM.py | from tf_keras_vis.utils import normalize
from tf_keras_vis.gradcam import Gradcam
from matplotlib import cm as mat_cm
from sklearn.metrics import jaccard_score
from tf_keras_vis.gradcam import GradcamPlusPlus
import tensorflow as tf
import numpy as np
import pickle
from . import CXAI_evaluation
import os
import pandas ... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/sampler/rules/langevin.py | import jax
import jax.numpy as jnp
import numpy as np
from functools import partial
from flax import struct
from .base import MetropolisRule
import netket.jax as nkjax
@struct.dataclass
class LangevinRule(MetropolisRule):
r"""
A transition rule that uses Langevin dynamics [1] to update samples.
.. math... | PypiClean |
/MagnetiCalc-1.15.2.tar.gz/MagnetiCalc-1.15.2/magneticalc/Backend_Types.py |
# ISC License
#
# Copyright (c) 2020–2022, Paul Wilhelm <anfrage@paulwilhelm.de>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWA... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/notify/notifiers/xmpp.py | import logging
from loguru import logger
from flexget import plugin
from flexget.config_schema import one_or_more
from flexget.event import event
from flexget.plugin import DependencyError
plugin_name = 'xmpp'
logger = logger.bind(name=plugin_name)
class XMPPNotifier:
"""
Sends messages via XMPP. The slee... | PypiClean |
/Deep-Transit-0.1.0.tar.gz/Deep-Transit-0.1.0/src/deep_transit/mge/dataset.py | from deep_transit import config
import numpy as np
import os
import pandas as pd
import megengine as mge
import megengine.functional as F
from PIL import Image, ImageFile
from megengine.data import dataset, DataLoader
from .utils import (
cells_to_bboxes,
iou_width_height as iou,
)
ImageFile.LOAD_TRUNCATED_IM... | PypiClean |
/NAMS-0.9.2.tar.gz/NAMS-0.9.2/nams/chirality.py | import openbabel, pybel
class Chirality:
"""
This class determinates the chirality of a molecule according to the R-S convention based
on linear notations to represent the molecular structure: SMILES or InCHI.
It requires Python 2.6 or above and Openbabel 2.3.1.
"""
def __init__(self, line_... | PypiClean |
/Montreal-Forced-Aligner-3.0.0a3.tar.gz/Montreal-Forced-Aligner-3.0.0a3/docs/source/reference/database/index.rst |
.. _database_api:
Database
========
MFA uses a SQLite database to cache information during training/alignment runs. An issue with training larger corpora was running into memory bottlenecks as all the information in the corpus was stored in memory, and fMLLR estimations in later stages would crash. Additionally, t... | PypiClean |
/EncryptedPickle-0.1.4.tar.gz/EncryptedPickle-0.1.4/encryptedpickle/encryptedpickle.py | from __future__ import absolute_import
import zlib
from time import time
from struct import pack, unpack
from collections import namedtuple
import simplejson as json
from pbkdf2 import PBKDF2
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Hash import HMAC, SHA, SHA256, SHA384, SH... | PypiClean |
/HBT_IP_Test-1.0.1-py3-none-any.whl/HBT_IP_Test/libs/isom/python/AC_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 |
/BigJob-0.64.5.tar.gz/BigJob-0.64.5/bigjob/job_plugin/gcessh.py |
from bigjob import logger
from apiclient.discovery import build
from oauth2client.file import Storage
from oauth2client.client import OAuth2WebServerFlow
from oauth2client.tools import run
import httplib2
import os
import uuid
import time
import saga
"""
AN OAUTH2 Client Id must be created at the Google API console ... | PypiClean |
/HandGestureRec-0.1.7.tar.gz/HandGestureRec-0.1.7/src/MLScript.py |
# working model
# model = Sequential()
# model.add(LSTM(32, return_sequences=True, activation='relu'))
# model.add(LSTM(64, return_sequences=True, activation='relu'))
# model.add(LSTM(32, return_sequences=False, activation='relu'))
# model.add(Dense(32, activation='relu'))
# model.add(Dense(16,... | PypiClean |
/BPTK_Py-1.8.0.tar.gz/BPTK_Py-1.8.0/BPTK_Py/util/serializer.py |
import json
class serializer():
"""
Simple Serializer class
"""
def __init__(self):
"""
Initialize addresses
"""
self.addresses = []
def serialize_to_json(self, obj, filename):
self.addresses = []
res = self.serialize(obj)
with open(filena... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/aerodynamics/aero_3D/aero_buildup.py | from aerosandbox import ExplicitAnalysis
from aerosandbox.geometry import *
from aerosandbox.performance import OperatingPoint
import aerosandbox.library.aerodynamics as aero
import aerosandbox.numpy as np
from aerosandbox.aerodynamics.aero_3D.aero_buildup_submodels.fuselage_aerodynamics_utilities import *
from aerosan... | PypiClean |
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/mappfinder.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 |
/FlowMaster-0.7.1.tar.gz/FlowMaster-0.7.1/flowmaster/pool.py | from collections import defaultdict
from typing import Literal
import pendulum
from flowmaster.setttings import Settings
from flowmaster.utils.logging_helper import logger
from flowmaster.utils.yaml_helper import YamlHelper
class Counter:
def __init__(self):
self.counters = defaultdict(int)
def __s... | PypiClean |
/OBITools-1.2.13.tar.gz/OBITools-1.2.13/doc/sphinx/source/formats.rst | File formats usable with OBITools
=================================
.. _the-sequence-files:
The sequence files
------------------
Sequences can be stored following various format. OBITools knows
some of them. The central format for sequence files manipulated by OBITools scripts
is the :doc:`fasta format <fasta>`. O... | PypiClean |
/Flask_BS4-5.3.1.0-py3-none-any.whl/flask_bs4/static/js/bootstrap.esm.js | import * as Popper from '@popperjs/core';
/**
* --------------------------------------------------------------------------
* Bootstrap dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
* Cons... | PypiClean |
/McStasScript-0.0.63.tar.gz/McStasScript-0.0.63/mcstasscript/instrument_diagnostics/beam_diagnostics.py | from mcstasscript.helper.mcstas_objects import DeclareVariable
from mcstasscript.helper.mcstas_objects import Component
from mcstasscript.instrument_diagnostics.diagnostics_instrument import DiagnosticsInstrument
from mcstasscript.instrument_diagnostics.view import View
from mcstasscript.instrument_diagnostics.plot_ove... | PypiClean |
/21cmFAST-3.3.1.tar.gz/21cmFAST-3.3.1/INSTALLATION.rst | ============
Installation
============
The easiest way to install ``21cmFAST`` is to use ``conda``. Simply use
``conda install -c conda-forge 21cmFAST``. With this method, all dependencies are taken
care of, and it should work on either Linux or MacOS. If for some reason this is not
possible for you, read on.
Depende... | PypiClean |
/BotCore-1.1.4.tar.gz/BotCore-1.1.4/README.md |
## Description
Just base core for simple telegram bots.
## How to create a bot
```
class AwesomeBot(Bot):
def __init__(self, token: str):
super().__init__(token)
def init_controllers(self):
UserController(self)
def handle(self, e):
self.send_message(12345, traceback.format_exc()... | PypiClean |
/hypergraphanalysistoolbox-1.0.20.tar.gz/hypergraphanalysistoolbox-1.0.20/docs/dev.rst | Development
===========
This page contains the goals for the next version of HAT. To contribute, for information on the below, or to request specific features in HAT, please contact us at jpic@umich.edu
Software Development
********************
1. Automated testing of software
2. Increased number of tutorial
3. Incre... | PypiClean |
/CCIT-0.4.tar.gz/CCIT-0.4/README.md | # CCIT
__Classifier Conditional Independence Test: A CI test that uses a binary classifier (XGBoost) for CI testing__
__This is an implementation of the paper: https://arxiv.org/abs/1709.06138__
_Please cite the above paper if this package is used in any publication._
__Usage for pip install__
1. ```pip install CC... | PypiClean |
/MAVR-0.93.tar.gz/MAVR-0.93/scripts/sequence_clusters/eggnog/assign_orthologs_by_emapper.py | __author__ = 'Sergei F. Kliver'
import argparse
from RouToolPa.Tools.Annotation import Emapper
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--eggnog_db", action="store", dest="eggnog_db", required=True,
help="EggNOG database to use for ortholog assignment")
parser.add_argument("-... | PypiClean |
/ExcelConverter-0.1.35.tar.gz/ExcelConverter-0.1.35/converter/excel_wrapper.py | try:
import numpy as np
except:
pass
import abc
from abc import abstractmethod
import os
from os import path
from openpyxl import load_workbook
from openpyxl.utils import range_boundaries
from .excel_util import ERR_NA, ERR_VALUE, ERR_REF, ERR_NAME, ERR_DIV, get_zeros
from .excel_lib import xround
MAX_ROWS = ... | PypiClean |
/ALU-PyQuest-0.1.9.tar.gz/ALU-PyQuest-0.1.9/README.md | <h1 align="center">ALU-PYQUEST🐍💻</h1>
<img src="https://github.com/Elhameed/ALU-PYQUEST/blob/main/img/pythonquiz.jpg" />
🐍 ALU PYQUEST 🎮 is a game designed to 🧐 test your knowledge of Python programming language. It consists of a series of 🤔 questions related to the Python curriculum, presented one at a time ⏰,... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/trackers/strongsort/deep/reid_model_factory.py | import torch
from collections import OrderedDict
__model_types = [
'resnet50', 'mlfn', 'hacnn', 'mobilenetv2_x1_0', 'mobilenetv2_x1_4',
'osnet_x1_0', 'osnet_x0_75', 'osnet_x0_5', 'osnet_x0_25',
'osnet_ibn_x1_0', 'osnet_ain_x1_0']
__trained_urls = {
# market1501 models ##############################... | PypiClean |
/EC_MS-0.7.5.tar.gz/EC_MS-0.7.5/src/EC_MS/preferences/colors.py | import numpy as np
from matplotlib import pyplot as plt
from matplotlib import colors
ColorConverter = colors.ColorConverter
plt.close("all")
colorlist = list(colors.cnames.items())
ourcolors_0 = {
"M2": "b",
"M4": "m",
"M18": "y",
"M28": "0.5",
"M32": "k",
"M40": "c",
"M44": "brown",
... | PypiClean |
/Heralding-1.0.7.tar.gz/Heralding-1.0.7/heralding/misc/common.py |
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along... | PypiClean |
/Neighborhoodize-0.9.6.tar.gz/Neighborhoodize-0.9.6/README.md | # Neighborhoodize

Neighborhoodize uses `fastkml`, `fiona`, and `shapely` to determine what
neighborhood a latitude, longitude pair resides in.
## Installation
### Dependencies
This package uses `shapely` and `fiona`, which require `GEOS` and `GDAL`. On OS
X an... | PypiClean |
/Fedtools-0.0.7-py3-none-any.whl/FedTools/Beigebook.py |
from __future__ import print_function
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
from fake_useragent import UserAgent
from datetime import datetime
import re
import pandas as pd
import pickle
import threading
import sys
import os
class BeigeBooks(object):
"""
This class firstly... | PypiClean |
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/examples/elphf/poisson.py | r"""
A simple 1D example to test the setup of the Poisson equation.
>>> from fipy import CellVariable, Grid1D, DiffusionTerm, Viewer
>>> from fipy.tools import numerix
>>> nx = 200
>>> dx = 0.01
>>> L = nx * dx
>>> mesh = Grid1D(dx = dx, nx = nx)
The dimensionless Poisson equation is
.. math::
\nabla\cdot\left(... | PypiClean |
/Blue-DiscordBot-3.2.0.tar.gz/Blue-DiscordBot-3.2.0/bluebot/core/feature.py | import contextlib
import pkgutil
from importlib import import_module, invalidate_caches
from importlib.machinery import ModuleSpec
from pathlib import Path
from typing import Union, List, Optional
import bluebot.feature
from bluebot.core.utils import deduplicate_iterables
import discord
from . import checks, commands... | PypiClean |
/MSArqAuth-0.0.1.tar.gz/MSArqAuth-0.0.1/libname/MSArqAuth.py | from datetime import datetime, timedelta
import json
import jwt
import requests
from sqlalchemy import null
import xmltodict
import base64
import uuid
from xml.dom import minidom
import urllib
from os import getenv
from os.path import exists
def create_token(data: dict):
time = datetime.utcnow() + timedelta(minute... | PypiClean |
/aleksis_app_alsijil-3.0.1.tar.gz/aleksis_app_alsijil-3.0.1/aleksis/apps/alsijil/tasks.py | from copy import deepcopy
from datetime import date, timedelta
from django.db.models import Q
from django.utils.translation import gettext as _
from calendarweek import CalendarWeek
from celery.result import allow_join_result
from celery.states import SUCCESS
from aleksis.apps.chronos.models import Event, ExtraLesso... | PypiClean |
/Dowell%20Mail-1.0.2.tar.gz/Dowell Mail-1.0.2/docs/_build/html/_static/javascripts/lunr/lunr.fr.js | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer su... | PypiClean |
/Flask-reStructuredText-1.2.tar.gz/Flask-reStructuredText-1.2/flask_restructuredtext/__init__.py | from collections.abc import Sequence, Set, Mapping
from importlib import import_module
from importlib.util import resolve_name
from flask import Markup
from jinja2 import evalcontextfilter, escape
from docutils.core import publish_parts
from docutils.parsers.rst import directives as docutils_directives
from docutils... | PypiClean |
/FrogstarB-0.1.0.tar.gz/FrogstarB-0.1.0/frogstarb/__init__.py | version = "0.1.0"
version_info = (0,1,0, "Beta")
import os.path, logging, ConfigParser
import markup
# pre processors ---------------------------------------------------------------
def set_title(data):
if not data.has_key('title'):
basename = os.path.basename(data['path'])
data['title'] = os.path.splitext... | PypiClean |
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/transitions/collapse-transition.js | 'use strict';
exports.__esModule = true;
var _dom = require('element-ui/lib/utils/dom');
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var Transition = function () {
function Transition() ... | PypiClean |
/dl_track_us-0.1.2.2.tar.gz/dl_track_us-0.1.2.2/DL_Track_US/DL_Track_US_GUI.py | import os
import tkinter as tk
from threading import Lock, Thread
from tkinter import E, N, S, StringVar, Tk, W, filedialog, ttk
from DL_Track_US import gui_helpers
class DLTrack:
"""
Python class to automatically or manually annotate longitudinal muscle
ultrasonography images/videos of human lower limb... | PypiClean |
/Autograde-0.1.1.tar.gz/Autograde-0.1.1/autograde/readmeparser.py | import re, os
from autograde.models import *
from django.core.files import File
from zipfile import ZipFile
def parse(directory):
"""
Parses the README file and creates the required models
"""
def flushBuffer(buf, results):
results[current_header] = buf
return [], results
header_pa... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/drawing/util/oo.js.uncompressed.js | define("dojox/drawing/util/oo", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.drawing.util.oo");
// TODO:
// allow a declare without a mixin
dojox.drawing.util.oo = {
// summary:
// Inheritance utilities used in DojoX Drawing
// description:
// Inheritance utilities used in DojoX Dra... | PypiClean |
/CADET-Process-0.7.3.tar.gz/CADET-Process-0.7.3/CADETProcess/dynamicEvents/event.py | from abc import abstractmethod
import copy
from addict import Dict
import numpy as np
from collections import defaultdict
from CADETProcess import CADETProcessError
from CADETProcess.dataStructure import StructMeta, frozen_attributes
from CADETProcess.dataStructure import UnsignedFloat
from CADETProcess.dataStructur... | PypiClean |
/daxfi-1.1.tar.gz/daxfi-1.1/docs/examples/README.txt |
To see the resulting command for these XML files, use the
'daxfixmlfile' script.
You can use the '-f' option to specify a given firewall,
otherwise your installed firewall is used.
E.g.:
# daxfixmlfile -f ipchains test01.xml
ipchains -A input -j ACCEPT --destination-port 80 -p 6 --source 192.196.1.0/255.255.255.0
... | PypiClean |
/AlignR-2.0.5.tar.gz/AlignR-2.0.5/AlignmentReporter/Vizualisation.py | import math
import traceback as tr
from typing import Dict, List, Any, Tuple
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from scipy.interpolate import make_interp_spline, BSpline
def map_to_circle(df):
"""
Remap DataFrame values to a circle of R=1
:param df: DataFrame wit... | PypiClean |
/CartiMorph_nnUNet-1.7.14.tar.gz/CartiMorph_nnUNet-1.7.14/CartiMorph_nnUNet/inference/predict.py |
# (added by YCYao)
# ---------------------------
# import os
# os.environ['MKL_NUM_THREADS'] = '4'
# ---------------------------
import argparse
from copy import deepcopy
from typing import Tuple, Union, List
import numpy as np
from batchgenerators.augmentations.utils import resize_segmentation
from CartiMorph_nnUNe... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.