id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/ForceAtlas2-1.0.tar.gz/ForceAtlas2-1.0/forceatlas2/forceatlas2.py
import numpy from math import sqrt import random from . import fa2util # Default parameters # ================== # Given an adjacency matrix, this function computes the node positions # according to the ForceAtlas2 layout algorithm. It takes the same # arguments that one would give to the ForceAtlas2 algorithm in...
PypiClean
/IPython-Dashboard-0.1.5.tar.gz/IPython-Dashboard-0.1.5/dashboard/static/js/jquery.tablesorter-2.23.5.js
* Client-side table sorting with ease! * @requires jQuery v1.2.6+ * * Copyright (c) 2007 Christian Bach * fork maintained by Rob Garrison * * Examples and docs at: http://tablesorter.com * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gp...
PypiClean
/KnowledgeCore-2.8.10.tar.gz/KnowledgeCore-2.8.10/src/knowledge_core/knowledge_core_ros.py
import sys try: import rospy except ImportError: print( "Unable to load the ROS support. You might want to run with --no-ros" " to use KnowledgeCore without ROS support enabled." ) sys.exit(1) import json from diagnostic_msgs.msg import DiagnosticArray, DiagnosticStatus from knowledge...
PypiClean
/EMalign-1.0.5.tar.gz/EMalign-1.0.5/src/align_projection_2d.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 9 16:55:46 2021 @author: yaelharpaz1 """ import time import numpy as np import math import cmath import logging import threading from concurrent.futures import ThreadPoolExecutor from concurrent.futures import wait from src.cryo_project_itay_finuf...
PypiClean
/OASYS1-ShadowOui-Advanced-Tools-1.0.116.tar.gz/OASYS1-ShadowOui-Advanced-Tools-1.0.116/orangecontrib/shadow_advanced_tools/widgets/sources/ow_hybrid_undulator.py
import sys import numpy from silx.gui.plot import Plot2D from PyQt5.QtWidgets import QMessageBox, QDialog, QVBoxLayout, QLabel, QDialogButtonBox from PyQt5.QtGui import QPixmap, QPalette, QColor, QFont from PyQt5.QtCore import QSettings import orangecanvas.resources as resources from orangewidget import gui from oa...
PypiClean
/FuzzManager-0.5.1-py3-none-any.whl/FTB/Signatures/RegisterHelper.py
x86Registers = ["eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp", "eip"] x64Registers = [ "rax", "rbx", "rcx", "rdx", "rsi", "rdi", "rbp", "rsp", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "rip", ] armRegisters = [ "r0", "r1"...
PypiClean
/Chiplotle3-0.4.3-py3-none-any.whl/chiplotle3/geometry/shapes/bezier_path.py
from __future__ import division from builtins import range from past.utils import old_div from chiplotle3.geometry.core.coordinatearray import CoordinateArray from chiplotle3.geometry.core.coordinate import Coordinate from chiplotle3.geometry.core.path import Path from chiplotle3.tools.mathtools.bezier_interpolation im...
PypiClean
/NVDA-addonTemplate-0.5.2.zip/NVDA-addonTemplate-0.5.2/NVDAAddonTemplate/data/{{cookiecutter.project_slug}}/scons-local-2.5.0/SCons/Scanner/Fortran.py
__revision__ = "src/engine/SCons/Scanner/Fortran.py rel_2.5.0:3543:937e55cd78f7 2016/04/09 11:29:54 bdbaddog" import re import SCons.Node import SCons.Node.FS import SCons.Scanner import SCons.Util import SCons.Warnings class F90Scanner(SCons.Scanner.Classic): """ A Classic Scanner subclass for Fortran sour...
PypiClean
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/person/zh_CN/__init__.py
from collections import OrderedDict from .. import Provider as PersonProvider class Provider(PersonProvider): formats = ["{{last_name}}{{first_name}}"] first_names_male = [ "伟", "强", "磊", "洋", "勇", "军", "杰", "涛", "超", "明", ...
PypiClean
/BlitzTUI-0.48.1.tar.gz/BlitzTUI-0.48.1/blitztui/client.py
import base64 import codecs import logging import os import sys from os.path import isfile import grpc log = logging.getLogger(__name__) IS_WIN32_ENV = sys.platform == "win32" if IS_WIN32_ENV: cur_path = os.path.abspath(os.path.curdir) config_script1 = os.path.join(cur_path, "home.admin", "config.scripts")...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojo/i18n.js
define("dojo/i18n",["./_base/kernel","require","./has","./_base/array","./_base/config","./_base/lang","./_base/xhr"],function(_1,_2,_3,_4,_5,_6,_7){ var _8=_1.i18n={},_9=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,_a=function(_b,_c,_d,_e){ for(var _f=[_d+_e],_10=_c.split("-"),_11="",i=0;i<_10.length;i++){ _11+=(_11?"-":...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA-AI-1.1/DLTA_AI_app/mmdetection/.dev_scripts/check_links.py
import argparse import logging import os import pathlib import re import sys from multiprocessing.dummy import Pool from typing import NamedTuple, Optional, Tuple import requests from mmcv.utils import get_logger def parse_args(): parser = argparse.ArgumentParser( description='Goes through all the inlin...
PypiClean
/OctoBot_Launcher-2.0.4-py3-none-any.whl/launcher/launcher_entry.py
import argparse import logging import sys import webbrowser from launcher import VERSION from launcher.tools import environment from launcher.tools.environment import ensure_minimum_environment def launcher(args=sys.argv[1:]): logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(descrip...
PypiClean
/FiPy-3.4.4.tar.gz/FiPy-3.4.4/documentation/tutorial/index.rst
.. _chp-howtoread: How to Read the Modules Documentation ===================================== Each chapter describes one of the main sub-packages of the :mod:`fipy` package. The sub-package :mod:`fipy.package` can be found in the directory :file:`fipy/package/`. In a few cases, there will be packages within packages...
PypiClean
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/pym/bob/scm/scm.py
from ..errors import ParseError from ..utils import joinLines from abc import ABCMeta, abstractmethod from enum import Enum from shlex import quote import fnmatch import re SYNTHETIC_SCM_PROPS = frozenset(('__source', 'recipe', 'overridden')) class ScmOverride: def __init__(self, override): self.__match ...
PypiClean
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/full/plugins/a11yhelp/dialogs/lang/sr-latn.js
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang("a11yhelp","sr-latn",{title:"Uputstva za pomoć",contents:"Sadržaji za pomoć. Da bi ste zatvorili diјalog pritisnite ESC.",legend:...
PypiClean
/NferModule-0.16.0.tar.gz/NferModule-0.16.0/python/nfer/nfer.py
from queue import Queue, Empty from threading import Thread, current_thread, main_thread, enumerate import _nfer import time import logging from nfer.rules import Rule from nfer.normalize import normalize_interval_name, denormalize_interval_name """ This file contains the primary API for monitoring and reporting inter...
PypiClean
/MatchZoo-test-1.0.tar.gz/MatchZoo-test-1.0/matchzoo/trainers/trainer.py
import typing from pathlib import Path import numpy as np import pandas as pd from tqdm.auto import tqdm import torch import torch.nn as nn import torch.optim as optim import matchzoo from matchzoo import tasks from matchzoo.dataloader import DataLoader from matchzoo.engine.base_model import BaseModel from matchzoo....
PypiClean
/GoogleLocationUtility-0.1.0a1.tar.gz/GoogleLocationUtility-0.1.0a1/src/GLU/geostrip.py
import pandas as pd from pathlib import Path from time import asctime from .settings_loader import config_load, source_folder from exif import Image import click def geostrip(): # Settings Read subfolders, open_mode = config_load('geoStrip') # Choose Folder source = source_folder('geoStrip') i...
PypiClean
/INGInious-0.8.7.tar.gz/INGInious-0.8.7/inginious/frontend/static/js/codemirror/mode/octave/octave.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 s...
PypiClean
/Flask-pymysql-0.2.3.tar.gz/Flask-pymysql-0.2.3/README.md
Flask-pymysql ================ Flask-pymysql is a fork of Flask-mysqldb, which instead uses the PyMySQL driver, which is a pure python driver. Changelog --------- ### 0.2.3 This version now uses a kwarg dict which is passed to PyMySQL, there is no longer a curated list of attributes. If you are migrating from Flask-...
PypiClean
/ISPy-solar-0.2.3.tar.gz/ISPy-solar-0.2.3/ISPy/util/azimuth.py
import numpy as np import warnings warnings.filterwarnings("ignore") # ==================================================================== def BTAZI2BQBU(Bt,azi): """Transformation from transverse field and azimuth to BQ and BU according to https://arxiv.org/abs/1904.03714 Parameters ---------- ...
PypiClean
/Camelot-13.04.13-gpl-pyqt.tar.gz/Camelot-13.04.13-gpl-pyqt/camelot/view/controls/modeltree.py
import logging logger = logging.getLogger('camelot.view.controls.modeltree') from PyQt4 import QtGui from PyQt4.QtCore import Qt from camelot.core.utils import ugettext as _ class ModelItem(QtGui.QTreeWidgetItem): """Custom tree item widget""" def __init__(self, parent, columns_names, section_item): ...
PypiClean
/BNIAJFI_VitalSigns-0.0.13.tar.gz/BNIAJFI_VitalSigns-0.0.13/VitalSigns/BCPSS.py
__all__ = ['eattend', 'mattend', 'hsattend', 'aastud', 'wstud', 'hstud', 'abse', 'absmd', 'abshd', 'drop', 'compl', 'sclsw', 'eenrol', 'menrol', 'hsenrol'] # Cell def eattend(df, csa, yr): # Create the Numerator eattend = df.copy() eattend = eattend[ eattend['grade'].str.contains('^1$|^2$|^3$|^4$|^5...
PypiClean
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/airfoil.py
import numpy as np from pathlib import Path import json from foilmesh.splinerefine import SplineRefine from foilmesh.trailingedge import TrailingEdge from foilmesh import meshing as meshing from foilmesh import connect from foilmesh.controldict import ControlDict, extension import logging from typing import Union f...
PypiClean
/Djblets-3.3.tar.gz/Djblets-3.3/docs/djblets/guides/privacy/consent.rst
.. _privacy-consent: ============================ Getting and Checking Consent ============================ .. py:currentmodule:: djblets.privacy.consent If your application passes a user's personal information (such as :term:`PII`) to third-party services, it's often good to get the user's consent (and for EU users...
PypiClean
/IMMP-0.12.1.tar.gz/IMMP-0.12.1/immp/core/stream.py
from asyncio import FIRST_COMPLETED, CancelledError, Event, ensure_future, wait import logging log = logging.getLogger(__name__) class PlugStream: """ Message multiplexer, to read messages from multiple asynchronous generators in parallel. Instances of this class are async-iterable -- for each incoming...
PypiClean
/6_rosdep-0.1.0-py3-none-any.whl/fixed_rosdep/catkin_support.py
from __future__ import print_function import os from subprocess import Popen, PIPE, CalledProcessError from . import create_default_installer_context from .lookup import RosdepLookup from .platforms.debian import APT_INSTALLER from .platforms.osx import BREW_INSTALLER from .platforms.pip import PIP_INSTALLER from .p...
PypiClean
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/core/callbacks/checkpoint_callback.py
__all__ = [ 'CheckpointCallback' ] from typing import Union, Optional, Callable, Dict, Sequence from pathlib import Path import sys from fastNLP.core.log import logger from .topk_saver import TopkSaver from .callback import Callback from ..utils.exceptions import EarlyStopException class CheckpointCallback(Call...
PypiClean
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/user_cipher_use.py
import builtins import datetime from files_sdk.api import Api from files_sdk.list_obj import ListObj from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError class UserCipherUse: default_attributes = { 'id': None, # int64 - UserCipherUse ID 'protocol_ci...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/wire/TextAdapter.js.uncompressed.js
define("dojox/wire/TextAdapter", ["dijit","dojo","dojox","dojo/require!dojox/wire/CompositeWire"], function(dijit,dojo,dojox){ dojo.provide("dojox.wire.TextAdapter"); dojo.require("dojox.wire.CompositeWire"); dojo.declare("dojox.wire.TextAdapter", dojox.wire.CompositeWire, { // summary: // A composite Wire for a c...
PypiClean
/JayDeBeApi-1.2.3.tar.gz/JayDeBeApi-1.2.3/README.rst
================================================================= JayDeBeApi - bridge from JDBC database drivers to Python DB-API ================================================================= .. image:: https://img.shields.io/travis/baztian/jaydebeapi/master.svg :target: https://travis-ci.org/baztian/jaydebeap...
PypiClean
/JupyterPiDAQ-0.8.1.tar.gz/JupyterPiDAQ-0.8.1/jupyterpidaq/Boards/Simulated/ADCsim.py
from numpy import random from numpy import std from numpy import sqrt from numpy import around from numpy import float64 from numpy import log10 from numpy import floor import time from jupyterpidaq.Boards import Board # Optimized for Pi 3B+ mimicking an installed ADS1115 ADC PiHAT. RATE = 475 # 475 Hz with oversam...
PypiClean
/Encry-1.3.1.1.tar.gz/Encry-1.3.1.1/README.rst
Welcome To Encry! ================= This is a simple, and fairly insecure Encryption module for python Meant to be perfect for things like chat messages... To use simply type this command once installed ---------------------------------------------- ``$ Encry.py --help`` Note: this command may change (see chan...
PypiClean
/Flask-Bleach-0.0.2.tar.gz/Flask-Bleach-0.0.2/flask_bleach.py
from flask import Markup from jinja2 import evalcontextfilter import bleach class Bleach(object): """Easy integration of bleach. This class is used to control the bleach integration to one or more Flask applications. Depending on how you initialize the object it is usable right away or will attach...
PypiClean
/LewisUtils-0.2.8.tar.gz/LewisUtils-0.2.8/lewisou/utils/pdf/PDFSheet.py
from reportlab.graphics.barcode import code93 from reportlab.lib.pagesizes import letter from reportlab.pdfgen import canvas from reportlab.lib.units import inch, mm import sys BARCODE = -1 class PDFSheet: def __init__ (self, pagesize=letter, rows=4, cols=3, font='Helvetica', font_size=20, left_adj=0.2*inch): ...
PypiClean
/edward-1.3.5.tar.gz/edward-1.3.5/edward/models/param_mixture.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import tensorflow as tf from edward.models.random_variable import RandomVariable from tensorflow.contrib.distributions import Distribution try: from edward.models.random_variables import Categori...
PypiClean
/HolmesIV-2021.9.8a1.tar.gz/HolmesIV-2021.9.8a1/mycroft/audio/services/simple/__init__.py
import signal from threading import Lock from time import sleep from mycroft.audio.services import AudioBackend from mycroft.messagebus.message import Message from mycroft.util.log import LOG from mycroft.util import play_mp3, play_ogg, play_wav import mimetypes import re from requests import Session def find_mime(p...
PypiClean
/FlyBrainLab-1.1.10-py3-none-any.whl/flybrainlab/utilities/neurosynapsis.py
import os import ast import pandas as pd import numpy as np import networkx as nx import json path = os.path.dirname(os.path.abspath(__file__)) def get_presynaptic(X, G, threshold=0.05): """ Returns a list of predecessors for a group of neurons. # Arguments X (list): List of nodes to get the predec...
PypiClean
/ExifRead-3.0.0-py3-none-any.whl/exifread/tags/makernote/olympus.py
from exifread.utils import make_string def special_mode(val): """Decode Olympus SpecialMode tag in MakerNote""" mode1 = { 0: 'Normal', 1: 'Unknown', 2: 'Fast', 3: 'Panorama', } mode2 = { 0: 'Non-panoramic', 1: 'Left to right', 2: 'Right to left',...
PypiClean
/MolassesClient-0.1.0.tar.gz/MolassesClient-0.1.0/CONTRIBUTING.rst
.. highlight:: shell ============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com...
PypiClean
/DjangoDjangoAppCenter-0.0.11-py3-none-any.whl/AppCenter/simpleui/static/admin/simpleui-x/elementui/radio-group.js
module.exports = /******/ (function (modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in ...
PypiClean
/KratosMeshingApplication-9.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/MeshingApplication/gradual_variable_interpolation_process.py
import KratosMultiphysics import KratosMultiphysics.MeshingApplication as KratosMA def Factory(settings, model): if not isinstance(settings, KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return GradualVariableInterpolationPro...
PypiClean
/ClevelandMuseumArt-1.0.1.tar.gz/ClevelandMuseumArt-1.0.1/CMA/utils.py
from io import BytesIO from PIL import Image import sys, random, argparse import numpy as np import math def covertImageToAscii(img, cols, scale, moreLevels): """ Given Image and dims (rows, cols) returns an m*n list of Images """ # gray scale level values from: # http://paulbourke.net/dat...
PypiClean
/CmlArabicReaderThird-0.1-py3-none-any.whl/ThirdcamelArabicReader/camel_tools/utils/charsets.py
# MIT License # # Copyright 2018-2021 New York University Abu Dhabi # # 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, c...
PypiClean
/LightSim2Grid-0.7.4-cp310-cp310-win_amd64.whl/lightsim2grid/gridmodel/_aux_add_slack.py
import warnings import numpy as np def _aux_add_slack(model, pp_net): """ add the slack bus(es) to the lightsim2grid "model" based on the information in the pandapower network. Notes ----- For now only single slack bus are supported in lightsim2grid. A warning will be issue if the pandapower ...
PypiClean
/OTLModel/Classes/Onderdeel/Funderingsmassief.py
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.Abstracten.Fundering import Fundering from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField from OTLMOW.OTLModel.Datatypes.DtuAfmetingGrondvlak import DtuAfmetingGrondvlak from OTLMOW.OTLModel.Datatypes.KlAlgMateria...
PypiClean
/NorenRestApiPytest-0.0.22.tar.gz/NorenRestApiPytest-0.0.22/README.md
# NorenApi Api used to connect to NorenOMS **** ## Build to build this package and install it on your server please use ``` pip install -r requirements.txt ``` **** ## API ```NorenApi``` - [login](#md-login) - [logout](#md-logout) Symbols - [searchscrip](#md-searchscrip) - [get_security_info](#md-get_security...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/scrolledpanel.py
import wx import math class ScrolledPanel(wx.ScrolledWindow): """ :class:`ScrolledPanel` fills a "hole" in the implementation of :class:`ScrolledWindow`, providing automatic scrollbar and scrolling behavior and the tab traversal management that :class:`ScrolledWindow` lacks. """ def __init__(s...
PypiClean
/functions/graph_embedding/node2vec/parallel.py
import random import numpy as np from tqdm import tqdm def parallel_generate_walks(d_graph: dict, global_walk_length: int, num_walks: int, cpu_num: int, sampling_strategy: dict = None, num_walks_key: str = None, walk_length_key: str = None, neighbors_key: str = ...
PypiClean
/GeoBases3K-5.0.16.zip/GeoBases3K-5.0.16/GeoBaseMain.py
from sys import stdin, stderr, argv import os import os.path as op from math import ceil, log from itertools import zip_longest, chain from textwrap import dedent import platform import re # Not in standard library from termcolor import colored import colorama import argparse # in standard libraray for Python >= 2.7 ...
PypiClean
/OTLModel/Classes/Verkeersbordopstelling.py
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut from OTLMOW.OTLModel.Classes.AIMObject import AIMObject from OTLMOW.OTLModel.Classes.Signalisatie import Signalisatie from OTLMOW.OTLModel.Datatypes.BooleanField import BooleanField from OTLMOW.OTLModel.Datatypes.DtcDocument import DtcDocument from OTLMO...
PypiClean
/Buoy-Base-0.0.11.tar.gz/Buoy-Base-0.0.11/buoy/base/database.py
import logging from typing import List, AnyStr import psycopg2 from psycopg2 import DatabaseError, IntegrityError, errorcodes from psycopg2.extensions import AsIs from psycopg2.extras import DictCursor, DictRow, register_uuid from buoy.base.data.item import BaseItem register_uuid() logger = logging.getLogger(__name...
PypiClean
/BEAT_TEST-0.13.1.tar.gz/BEAT_TEST-0.13.1/econml/score/rscorer.py
from ..dml import LinearDML from sklearn.base import clone import numpy as np from scipy.special import softmax from .ensemble_cate import EnsembleCateEstimator class RScorer: """ Scorer based on the RLearner loss. Fits residual models at fit time and calculates residuals of the evaluation data in a cross-fi...
PypiClean
/JustCause-0.4.tar.gz/JustCause-0.4/src/justcause/data/generators/rlearner.py
from typing import List, Optional, Tuple, Union import numpy as np import pandas as pd from numpy.random import RandomState from sklearn.utils import check_random_state from ..frames import CausalFrame from ..utils import generate_data OptRandState = Optional[Union[int, RandomState]] Frame = Union[CausalFrame, pd.Da...
PypiClean
/Flask_Unchained-0.9.0-py3-none-any.whl/flask_unchained/_code_templates/project/webpack/webpack.config.js
const fs = require('fs') const path = require('path') const webpack = require('webpack') const ExtractTextPlugin = require('extract-text-webpack-plugin') const ManifestPlugin = require('webpack-manifest-plugin') const ROOT_PATH = path.resolve(path.join(__dirname, '..')) const ASSETS_ROOT = path.join(ROOT_PATH, 'asset...
PypiClean
/Djaloha-0.4.2.tar.gz/Djaloha-0.4.2/djaloha/static/aloha.0.20/plugins/common/table/lib/table-plugin-utils.js
define( ['aloha/jquery'], function ($) { var Utils = { /** * Translates the DOM-Element column offset of a table-cell to the * column offset of a grid-cell, which is the column index adjusted * by other cells' rowspan and colspan values. * * @param rows the rows of a table as an array or jQuery object...
PypiClean
/DeepRank-GNN-0.1.22.tar.gz/DeepRank-GNN-0.1.22/deeprank_gnn/Metrics.py
import sys import os import torch import numpy as np from sklearn import metrics from sklearn.metrics import confusion_matrix from sklearn.metrics import roc_auc_score def get_binary(values, threshold, target): """ Transforms continuous or multiclass values into binary values (0/1) Args: values (...
PypiClean
/DjAIoT-23.6.21.1.tar.gz/DjAIoT-23.6.21.1/src/djaiot/device_data/models/device.py
__all__ = \ 'EnvVar', 'EnvironmentVariable' import logging import pandas import sys from django.core.serializers.json import DjangoJSONEncoder from django.db.models.base import Model from django.db.models.constraints import \ CheckConstraint, \ UniqueConstraint from django.db.models.deletion import \ ...
PypiClean
/Adafruit_Blinka-8.20.1-py3-none-any.whl/adafruit_blinka/microcontroller/rp2040_u2if/i2c.py
"""I2C Classes for RP2040s with u2if firmware""" from .rp2040_u2if import rp2040_u2if class I2C: """I2C Base Class for RP2040 u2if""" def __init__(self, index, *, frequency=100000): self._index = index rp2040_u2if.i2c_set_port(self._index) rp2040_u2if.i2c_configure(frequency) def...
PypiClean
/NURBS-Python-3.8.0.tar.gz/NURBS-Python-3.8.0/README.rst
NURBS-Python ^^^^^^^^^^^^ |DOI|_ |PYPI|_ |RTD|_ |TRAVISCI|_ |APPVEYOR|_ |WAFFLEIO|_ Introduction ============ This project aims to implement Non-Uniform Rational B-Spline (NURBS) curve and surface computation algorithms in native Python with minimum possible dependencies. The library is fully object-oriented and do...
PypiClean
/DHEater-0.4.0.tar.gz/DHEater-0.4.0/dheater/__main__.py
import argparse import os import time import socket import struct import threading from collections import deque from operator import methodcaller import abc import attr import urllib3 from cryptodatahub.common.algorithm import Authentication from cryptoparser.common.exception import InvalidType, NotEnoughData fr...
PypiClean
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/modeling/roi_heads/mask_head/loss.py
import torch from torch.nn import functional as F from PMTD.maskrcnn_benchmark.modeling.matcher import Matcher from PMTD.maskrcnn_benchmark.structures.boxlist_ops import boxlist_iou from PMTD.maskrcnn_benchmark.modeling.utils import cat def project_masks_on_boxes(segmentation_masks, proposals, discretization_size): ...
PypiClean
/GEMDAT-0.0.1-py3-none-any.whl/pymatgen/analysis/gemdat/plots/displacements.py
import matplotlib.pyplot as plt import numpy as np from pymatgen.core import Structure def plot_displacement_per_site(*, diff_displacements: np.ndarray, **kwargs): """Plot displacement per site. Parameters ---------- displacements : np.ndarray Numpy array with displacements """ fig, a...
PypiClean
/Colr-0.9.1.tar.gz/Colr-0.9.1/colr/preset.py
from functools import total_ordering from .colr import Colr @total_ordering class Preset(object): """ Colr arg dict for fore, back, and style arguments. Callable to wrap strings in a Colr that uses these arguments. Example: warn = Preset('red', 'white', 'bold') print(warn('...
PypiClean
/FunID-0.3.16.2.tar.gz/FunID-0.3.16.2/funid/external/trimal.v1.4/trimAl/scripts/get_sequences_gaps_ratio.py
# # 'get_sequneces_gaps.py' # # Script implemented to obtain the sequences index for those seuqneces # exceding a minimum gaps' ratio threshold. # # [2020] S. Capella-Gutierrez - salvador.capella@bsc.es # # this script is free software: you can redistribute it and/or modify it under # the terms of the GNU G...
PypiClean
/NEU-ipgw-manager-3.0rc0.tar.gz/NEU-ipgw-manager-3.0rc0/ipgw/core/api/SSO.py
import logging from urllib.parse import parse_qs, urlparse from requests import Session, codes from bs4 import BeautifulSoup, Tag from typing import TypedDict from .SSO_error import BackendError, UnionAuthError, UnknownPageError ua = '''Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) C...
PypiClean
/General-dist-0.2.tar.gz/General-dist-0.2/Generaldist/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
/BEAT_TEST-0.13.1.tar.gz/BEAT_TEST-0.13.1/econml/_ensemble/_ensemble.py
import numbers import numpy as np from abc import ABCMeta, abstractmethod from sklearn.base import BaseEstimator, clone from sklearn.utils import _print_elapsed_time from sklearn.utils import check_random_state from joblib import effective_n_jobs def _fit_single_estimator(estimator, X, y, sample_weight=None, ...
PypiClean
/Cola-0.1.0b0.tar.gz/Cola-0.1.0b0/app/wiki/__init__.py
import os import re import urlparse from datetime import datetime from cola.core.urls import UrlPatterns, Url from cola.core.parsers import Parser from cola.core.opener import MechanizeOpener from cola.core.errors import DependencyNotInstalledError from cola.core.config import Config from cola.job import JobDescriptio...
PypiClean
/Diesis-1.0.5.tar.gz/Diesis-1.0.5/diesis/TagHelper.py
from typing import Set, Any from mutagen.mp4 import MP4, MP4Cover from mutagen.id3 import ID3, TIT2, TPE1, TALB, TYER, TCON, USLT, TPOS, TRCK, APIC, COMM, TPE2, WOAF, PictureType, TEXT from mutagen.flac import FLAC, Picture from mutagen.aiff import AIFF from diesis import Song, Config import mutagen import base64 cla...
PypiClean
/KindleComicConverter_headless-5.5.2-py3-none-any.whl/kindlecomicconverter/comic2panel.py
import os import sys from shutil import rmtree, copytree, move from optparse import OptionParser, OptionGroup from multiprocessing import Pool from PIL import Image, ImageChops, ImageOps, ImageDraw from .shared import getImageFileName, walkLevel, walkSort, sanitizeTrace def mergeDirectoryTick(output): if output:...
PypiClean
/ExoDMC-1.1b0.tar.gz/ExoDMC-1.1b0/README.md
Exoplanet Detection Map Calculator (Exo-DMC) ========== Information ----------- This repository includes the first version of the `Exo-DMC` (Exoplanet Detection Map Calculator), a Monte Carlo tool for the statistical analysis of exoplanet surveys results. The tool combines the information on the target stars with th...
PypiClean
/AsciiDotter-2.1.0-py3-none-any.whl/ascii_dotter/braille_image.py
from __future__ import annotations from math import ceil, floor from typing import List from PIL import Image from ascii_dotter.braille_segment import BrailleFlag, BrailleSegment from ascii_dotter.luminance import LuminanceMethod ALPHA_TOLERANCE: int = 255//2 class BrailleImage: '''Representation of a Braille Im...
PypiClean
/Nosparser-0.11.tar.gz/Nosparser-0.11/src/nos_parser/template_miner_config.py
import ast import configparser import json import logging from nos_parser.masking import MaskingInstruction logger = logging.getLogger(__name__) class TemplateMinerConfig: def __init__(self): self.profiling_enabled = False self.profiling_report_sec = 60 self.snapshot_interval_minutes = 5...
PypiClean
/OBP_reliability_pillar-0.2.0.tar.gz/OBP_reliability_pillar-0.2.0/OBP_reliability_pillar/rds/rds_enhanced_monitoring_enabled.py
import logging import botocore logging.basicConfig(level=logging.INFO) logger = logging.getLogger() # checks compliance.py for rds automatic minor version enabled def rds_enhanced_monitoring_enabled(self) -> dict: """ :param self: :return dict: rds enhanced monitoring enabled compliance.py details "...
PypiClean
/ETLT-pgSQL-0.10.0.tar.gz/ETLT-pgSQL-0.10.0/README.rst
ETLT-pgSQL ========== ETLT-pgSQL: `ETLT <https://github.com/SetBased/py-etlt>`_ extension for `PostgreSQL <https://www.postgresql.org>`_ databases +-----------------------------------------------------------------------------------------------------------------------------------+-------------------------------------...
PypiClean
/Jinja2-3.1.2-py3-none-any.whl/jinja2/debug.py
import sys import typing as t from types import CodeType from types import TracebackType from .exceptions import TemplateSyntaxError from .utils import internal_code from .utils import missing if t.TYPE_CHECKING: from .runtime import Context def rewrite_traceback_stack(source: t.Optional[str] = None) -> BaseExc...
PypiClean
/BT-Manager-0.3.0.tar.gz/BT-Manager-0.3.0/bt_manager/codecs.py
from __future__ import unicode_literals from collections import namedtuple from bt_manager import ffi A2DP_CODECS = {'SBC': 0x00, 'MPEG12': 0x01, 'MPEG24': 0x02, 'ATRAC': 0x03, } """ Enumeration of codec types supported by A2DP profile """ SBCCodecConfig = n...
PypiClean
/FFEAT-1.0.0-py3-none-any.whl/ffeat/strategies/mutation/AdaptiveStep.py
from typing import Union import math import torch as t import ffeat class AdaptiveStep(ffeat.Pipe): """ Normal mutation with adaptive step. """ def __init__(self, init_std: float, std_increase: float, evaluation, std_decrease: float =...
PypiClean
/MAPIE-0.6.5-py3-none-any.whl/MAPIE-0.6.5.dist-info/AUTHORS.rst
======= Credits ======= Development Lead ---------------- * Thibault Cordier <tcordier@quantmetry.com> * Vincent Blot <vblot@quantmetry.com> * Louis Lacombe <llacombe@quantmetry.com> Emeritus Core Developers ------------------------ * Grégoire Martinon <gmartinon@quantmetry.com> * Vianney Taquet <vianney.taquet@gma...
PypiClean
/MojangAuthPython-0.1.4.tar.gz/MojangAuthPython-0.1.4/MojangAuth/MojangAuth.py
from requests import post import json class AuthException(Exception): def __init__(self, request: str): self.json_error = json.loads(request) self.message = self.json_error['error'] + ': ' + self.json_error['errorMessage'] super().__init__(self.message) class ServerEndpoint(enumerate): ...
PypiClean
/OctoBot-0.4.54.tar.gz/OctoBot-0.4.54/octobot/strategy_optimizer/optimizer_filter.py
import decimal import octobot_commons.logical_operators as logical_operators class OptimizerFilter: LEFT_OPERAND_KEY_KEY = "left_operand_key" RIGHT_OPERAND_KEY_KEY = "right_operand_key" LEFT_OPERAND_VALUE_KEY = "left_operand_value" RIGHT_OPERAND_VALUE_KEY = "right_operand_value" OPERATOR_KEY = "op...
PypiClean
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/imports/G2sad_xye.py
from __future__ import division, print_function import os.path as ospath import numpy as np import GSASIIobj as G2obj import GSASIIpath GSASIIpath.SetVersionNumber("$Revision: 3136 $") npasind = lambda x: 180.*np.arcsin(x)/np.pi class txt_XRayReaderClass(G2obj.ImportSmallAngleData): 'Routines to import X-ray q SAX...
PypiClean
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/aerodynamics/aero_2D/airfoil_optimizer/README.md
# Airfoil Optimizer by Peter Sharpe ## WARNING Airfoil optimization is dangerous territory that is so ripe for misunderstanding - it's much more complicated and nuanced than the point-design-drag-minimization problem that it appears to be on the surface. Before you continue, please read and deeply understand these a...
PypiClean
/Flask-Velox-2014.04.25.tar.gz/Flask-Velox-2014.04.25/flask_velox/mixins/sqla/object.py
from flask import request from flask_velox.mixins.context import ContextMixin class BaseModelMixin(ContextMixin): """ Mixin provides SQLAlchemy model integration. Attributes ---------- model : class SQLAlchemy un-instanciated model class session : object SQLAlchemy session instanc...
PypiClean
/Djblets-3.3.tar.gz/Djblets-3.3/djblets/webapi/managers.py
import json import logging from django.db import IntegrityError from django.db.models import Manager, Q from django.utils import timezone from django.utils.translation import gettext_lazy as _ from djblets.deprecation import RemovedInDjblets40Warning from djblets.secrets.token_generators import token_generator_regis...
PypiClean
/AutoDiffCC-1.1.1.tar.gz/AutoDiffCC-1.1.1/autodiffcc/ADmath.py
import numpy as np from autodiffcc.core import AD def cos(obj): """Returns the cos of a scalar or an AD object INPUTS ======= obj: AD object, scalar, or vector RETURNS ======== Returns the cos of obj EXAMPLES ========= >>> x = AD(val = 3, der = 1) >>> cos(x) ...
PypiClean
/Leytonium-10.tar.gz/Leytonium-10/leytonium/stmulti.py
# This file is part of Leytonium. # # Leytonium 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 3 of the License, or # (at your option) any later version. # # Leytonium is distributed in the ho...
PypiClean
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/methodcalls/stream/change_stream.py
import asyncio import logging import shlex from fipper.exception import NodeJSNotRunning from fipper.exception import ClientCallsNotSet from fipper.exception import NotInGroupCallError from fipper.file_manager import FileManager from fipper.xdcalls import NotInGroupCall from fipper.xdcalls import StreamDeleted from fi...
PypiClean
/Deustest2022-1.0-py3-none-any.whl/video_club/rent_store/serializers.py
from rest_framework import serializers from .models import Category, Movie, MovieCategoryAssociation, Rental, CustomUser from rest_framework import exceptions from django.db import transaction import datetime class ProfileSerializer(serializers.ModelSerializer): class Meta: model = CustomUser fie...
PypiClean
/OctoPrint-1.9.2.tar.gz/OctoPrint-1.9.2/README.md
<p align="center"><img src="https://octoprint.org/assets/img/logo.png" alt="OctoPrint's logo" /></p> <h1 align="center">OctoPrint</h1> <p align="center"> <img src="https://img.shields.io/github/v/release/OctoPrint/OctoPrint?logo=github&logoColor=white" alt="GitHub release"/> <img src="https://img.shields.io/pypi/...
PypiClean
/FESTIM-0.11.1-py3-none-any.whl/festim/concentration/concentration.py
from fenics import * import sympy as sp class Concentration: """Class for concentrations (solute or traps) with attributed fenics.Function objects for the solution and the previous solution and a fenics.TestFunction Args: solution (fenics.Function or ufl.Indexed): Solution for "current" ...
PypiClean
/Auptimizer-2.0.tar.gz/Auptimizer-2.0/src/aup/Proposer/eas/models/utils.py
from .dense_net import DenseNetConfig, DenseNet from .convnet import SimpleConvnetConfig, SimpleConvnet import numpy as np def get_model_config_by_name(name): if name == 'DenseNet': return DenseNetConfig elif name == 'SimpleConvnet': return SimpleConvnetConfig else: raise ValueError('Unknown model type %s' %...
PypiClean
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/builtin/list/rearrange.py
import functools from collections import defaultdict from itertools import chain from typing import Callable from mathics.builtin.base import Builtin, MessageException from mathics.core.atoms import Integer, Integer0, Integer1 from mathics.core.attributes import A_FLAT, A_ONE_IDENTITY, A_PROTECTED from mathics.core.ev...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/utils/formats.py
import decimal import datetime from django.conf import settings from django.utils import dateformat, numberformat, datetime_safe from django.utils.importlib import import_module from django.utils.encoding import force_str from django.utils.functional import lazy from django.utils.safestring import mark_safe from djang...
PypiClean
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/timers/promises.d.ts
declare module 'timers/promises' { import { TimerOptions } from 'node:timers'; /** * ```js * import { * setTimeout, * } from 'timers/promises'; * * const res = await setTimeout(100, 'result'); * * console.log(res); // Prints 'result' * ``` * @since v15.0.0 ...
PypiClean
/DA-DAPPER-1.2.2.tar.gz/DA-DAPPER-1.2.2/dapper/mods/LorenzUV/illust_LorenzUV.py
# Sorry for the mess. import matplotlib as mpl import numpy as np from matplotlib import pyplot as plt import dapper.mods as modelling from dapper.mods.LorenzUV.lorenz96 import LUV # Setup sd0 = modelling.set_seed(4) # from dapper.mods.LorenzUV.wilks05 import LUV nU, J = LUV.nU, LUV.J dt = 0.005 t0 = np.nan K = in...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/classes/Popup.js
var tinymce = null, tinyMCEPopup, tinyMCE; /** * TinyMCE popup/dialog helper class. This gives you easy access to the * parent editor instance and a bunch of other things. It's higly recommended * that you load this script into your dialogs. * * @static * @class tinyMCEPopup */ tinyMCEPopup = { /** * Initial...
PypiClean
/Nuitka_winsvc-1.7.10-cp310-cp310-win_amd64.whl/nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Interactive.py
# TODO: # # This has the potential to grow into something with a really big life # of its own, which might or might not be a good thing. Nevertheless, # here are some enhancements that will probably be requested some day # and are worth keeping in mind (assuming this takes off): # # - A command to re-read / re-load t...
PypiClean