id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Adeepspeed-0.9.2.tar.gz/Adeepspeed-0.9.2/deepspeed/runtime/sparse_tensor.py
# DeepSpeed Team """ Implementation of a compressed sparse tensor. Similar in functionality to TensorFlow's IndexedSlices implementation. """ import torch class SparseTensor(object): """ Compressed Sparse Tensor """ def __init__(self, dense_tensor=None): self.orig_dense_tensor = dense_tensor ...
PypiClean
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/web/media/js/mathjax/jax/output/SVG/fonts/TeX/Main/Italic/BasicLatin.js
MathJax.Hub.Insert(MathJax.OutputJax.SVG.FONTDATA.FONTS["MathJax_Main-italic"],{32:[0,0,250,0,0,""],33:[716,0,307,107,380,"330 716Q351 716 365 703T380 670V659L304 433Q230 207 227 204Q225 198 205 198Q184 198 184 207T220 439T260 669Q270 694 297 708Q300 709 304 710T311 713T316 714Q324 716 330 716ZM107 51Q110 83 133 102T17...
PypiClean
/GSAS-II-WONDER_win-1.0.1.tar.gz/GSAS-II-WONDER_win-1.0.1/GSAS-II-WONDER/imports/G2img_MAR.py
from __future__ import division, print_function import platform import time import GSASIIobj as G2obj import GSASIIpath import numpy as np GSASIIpath.SetVersionNumber("$Revision: 4112 $") class MAR_ReaderClass(G2obj.ImportImage): '''Routine to read several MAR formats, .mar3450,.mar2300,.mar2560 ''' def __i...
PypiClean
/Cohen-0.7.4.tar.gz/Cohen-0.7.4/coherence/backends/banshee_storage.py
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2009, Philippe Normand <phil@base-art.net> """ TODO: - podcasts """ from twisted.internet import reactor, defer, task from coherence.extern import db_row from coherence.upnp.core import DIDLLite from coherence.backend i...
PypiClean
/Flask-Scaffold-0.5.1.tar.gz/Flask-Scaffold-0.5.1/app/templates/static/node_modules/angular/angular.min.js
(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*...
PypiClean
/DeePyMoD-20.11b0.tar.gz/DeePyMoD-20.11b0/docs/examples/Burgers/PDE_Burgers.md
# Example Burgers' equation In this notebook we provide a simple example of the DeepMoD algorithm by applying it on the Burgers' equation. We start by importing the required libraries and setting the plotting style: ```python # General imports import numpy as np import torch import matplotlib.pylab as plt # DeepM...
PypiClean
/MolScribe-1.1.1.tar.gz/MolScribe-1.1.1/molscribe/interface.py
import argparse from typing import List import cv2 import torch from .dataset import get_transforms from .model import Encoder, Decoder from .chemistry import convert_graph_to_smiles from .tokenizer import get_tokenizer BOND_TYPES = ["", "single", "double", "triple", "aromatic", "solid wedge", "dashed wedge"] def...
PypiClean
/CsvWrpr-1.15.3.tar.gz/CsvWrpr-1.15.3/src/csvwrpr/csvwrpr.py
import os import sys import logging from pathlib import Path import displayfx import beetools _path = Path(sys.argv[0]) _name = _path.stem class CsvWrpr: '''Wrpr for CSV Files This module copies a csv file into a different structure. It returns the same csv file in a different structure i.e. list, dict...
PypiClean
/ColorStealthGame-0.1.tar.gz/ColorStealthGame-0.1/colorgame/app.py
import itertools from colorsys import hls_to_rgb, rgb_to_hls from random import randint, choice import pygame from pygame.locals import * from colorgame import cfg def blit_text(surface, text, pos, font, color=pygame.Color('black')): words = [word.split(' ') for word in text.splitlines()] # 2D array where each...
PypiClean
/Foundations-2.1.0.tar.gz/Foundations-2.1.0/docs/sphinx/source/resources/pages/api/foundations.common.rst
_`foundations.common` ===================== .. automodule:: foundations.common Module Attributes ----------------- .. attribute:: foundations.common.LOGGER .. attribute:: foundations.common.CONNECTION_IPS .. attribute:: foundations.common.DEFAULT_HOST_IP Functions --------- .. autofunction:: uniqify .. autofunc...
PypiClean
/Nikola-8.2.4-py3-none-any.whl/nikola/plugins/task/taxonomies.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
/AMQPQueue-0.4.2.tar.gz/AMQPQueue-0.4.2/amqpqueue/queuefactory.py
from amqpqueue import Producer, Consumer, Subscriber class QueueFactory(object): """Allows you to set defaults for your producer and consumer queues eg >>> qf = QueueFactory(addr="remote:5000", exchange_name="worker_exchange") >>> qp = qf.Producer("my_queue") >>> qp.put("etc.") ...
PypiClean
/ArpSpoof-1.1.2.tar.gz/ArpSpoof-1.1.2/README.md
![ArpSpoof logo](https://mauricelambert.github.io/info/python/security/ArpSpoof_small.png "ArpSpoof logo") # ArpSpoof ## Description This package implements an ARP Spoofer for MIM (Man-In-the-Middle) or DoS (Denial of Service) attacks. ## Requirements This package require: - python3 - python3 Standard Library -...
PypiClean
/Muntjac-1.1.2.tar.gz/Muntjac-1.1.2/muntjac/ui/form.py
from warnings import warn from muntjac.data.item import IEditor, IItem from muntjac.data.buffered import IBuffered, SourceException from muntjac.data.validatable import IValidatable from muntjac.data.validator import InvalidValueException from muntjac.data.property import IValueChangeListener from muntjac.event.action...
PypiClean
/Dreamake-0.0.107.tar.gz/Dreamake-0.0.107/src/dreamake/shapes.py
from pygame import Vector2, draw from pygame.color import THECOLORS as COLORS from pickle import loads, dumps, load, dump from math import cos, sin, atan2, degrees, radians, inf def load_geomodel(fpath): with open(fpath, mode="rb") as f: return load(f) def save_geomodel(model, fpath): with open(fpat...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Common/C_Extensions/WrapperArgsFactory.py
#+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+-...
PypiClean
/NREL-jade-0.9.9.tar.gz/NREL-jade-0.9.9/jade/extensions/registry.py
import copy import enum import importlib import logging import os import pathlib from jade.exceptions import InvalidParameter from jade.utils.utils import dump_data, load_data DEFAULT_REGISTRY = { "extensions": [ { "name": "generic_command", "description": "Allows batching of a l...
PypiClean
/DJModels-0.0.6-py3-none-any.whl/djmodels/core/management/base.py
import os import sys from argparse import ArgumentParser, HelpFormatter from io import TextIOBase import djmodels from djmodels.core import checks from djmodels.core.exceptions import ImproperlyConfigured from djmodels.core.management.color import color_style, no_style from djmodels.db import DEFAULT_DB_ALIAS, connect...
PypiClean
/JMaster-1.0.3.tar.gz/JMaster-1.0.3/README.md
# JMaster [中文文档](http://palayutm.cn/2017/12/24/JMaster/) Parse CodeForces contests and auto test sample. ## Install ### Using pip ``` shell $ pip3 install JMaster ``` ### Manual ``` shell $ git clone https://github.com/palayutm/JMaster.git $ cd JMaster $ python3 setup.py install ``` ## Usage ### View contest info...
PypiClean
/Deeplodocus-0.3.0-py3-none-any.whl/deeplodocus/core/inference/generic_evaluator.py
from typing import Union from typing import List # Backend imports from torch.nn import Module from torch import tensor import torch # Deeplodocus imports from deeplodocus.data.load.dataset import Dataset from deeplodocus.core.inference.generic_inferer import GenericInferer from deeplodocus.utils.generic_utils import...
PypiClean
/DragonPyEmulator-0.9.0-py3-none-any.whl/dragonpy/Dragon32/mem_info.py
import logging from MC6809.core.memory_info import BaseMemoryInfo from dragonpy.utils.humanize import nice_hex log = logging.getLogger(__name__) class DragonMemInfo(BaseMemoryInfo): MEM_INFO = ( (0x0, 0x0, "BREAK message flag - if negative print BREAK"), (0x1, 0x1, """String delimiting char (0...
PypiClean
/DART-OhGreat-0.0.5.tar.gz/DART-OhGreat-0.0.5/src/projections_OhGreat/project.py
import astra import numpy as np from os import mkdir from os.path import isdir from PIL import Image def project_from_2D(phantom_id, vol_geom, n_projections, n_detectors, detector_spacing, angles, noise_factor=None, save_dir=None, use_gpu=False): """ Creates projection...
PypiClean
/NTBEA-0.0.2.tar.gz/NTBEA-0.0.2/ntbea/ntbea.py
import numpy as np import logging from collections import defaultdict class Mutator(object): ''' Inherited by other mutator objects ''' def __init__(self, name): self._name = name def get_name(self): return self._name def mutate(self, x): raise NotImplementedError() ...
PypiClean
/Django_patch-2.2.19-py3-none-any.whl/django/contrib/gis/db/backends/base/operations.py
from django.contrib.gis.db.models import GeometryField from django.contrib.gis.db.models.functions import Distance from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.db.utils import NotSupportedError from django.utils.functional import cached_property class Ba...
PypiClean
/LundPDFMaster-1.1.1.tar.gz/LundPDFMaster-1.1.1/lund_pdf_master/OfficeToPDFConverter.py
import os import traceback import requests import logging import concurrent.futures from rest_framework.exceptions import APIException class OfficeToPDFConverter: def __init__(self, public_key, secret_key): """ Initialize the converter with the public and secret keys. Parameters: p...
PypiClean
/MergePythonSDK.ticketing-2.2.2-py3-none-any.whl/MergePythonSDK/accounting/api/webhook_receivers_api.py
import re # noqa: F401 import sys # noqa: F401 from MergePythonSDK.shared.api_client import ApiClient, Endpoint as _Endpoint from MergePythonSDK.shared.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_ty...
PypiClean
/MoonNectar-0.6.0.tar.gz/MoonNectar-0.6.0/mnectar/backend/vlc.py
import logging import vlc from mnectar.registry import Plugin, Registry from mnectar.util.signal import Signal from mnectar.library.view import ViewPointer import Registry.Backend logger = logging.getLogger(__name__) class BackendVLC(Plugin, registry=Registry.Backend): """VLC based backend. Requires the V...
PypiClean
/FlaskBB-2.0.2.tar.gz/FlaskBB-2.0.2/flaskbb/utils/database.py
import logging import pytz from flask_login import current_user from flask_sqlalchemy import BaseQuery from sqlalchemy.ext.declarative import declared_attr from flaskbb.extensions import db logger = logging.getLogger(__name__) def make_comparable(cls): def __eq__(self, other): return isinstance(other, ...
PypiClean
/BGWpy-3.2.2.tar.gz/BGWpy-3.2.2/Documentation/Examples/QuantumEspresso/v42-Workflow-GW.py
from os.path import join as pjoin from BGWpy import Structure, Workflow, QeScfTask, QeWfnTask, Qe2BgwTask, EpsilonTask, SigmaTask workflow = Workflow(dirname='42-Workflow') # Common arguments for tasks. kwargs = dict( structure = Structure.from_file('../../Data/Structures/GaAs.json'), prefix = 'GaAs', p...
PypiClean
/CNVkit-0.9.10-py3-none-any.whl/cnvlib/rna.py
import logging import numpy as np import pandas as pd from scipy.stats import gmean from .cnary import CopyNumArray as CNA from .fix import center_by_window NULL_LOG2_COVERAGE = -5 def before(char): def selector(string): return string.split(char, 1)[0] return selector def filter_probes(sample_c...
PypiClean
/Krakatau-noff-v0.20181212.tar.gz/Krakatau-noff-v0.20181212/Krakatau/ssa/objtypes.py
from ..verifier import verifier_types as vtypes # types are represented by classname, dimension # primitive types are .int, etc since these cannot be valid classnames since periods are forbidden def TypeTT(baset, dim): assert dim >= 0 return baset, dim # Not real types VoidTT = TypeTT('.void', 0) NullTT = Typ...
PypiClean
/Cnc25D-0.1.10.tar.gz/Cnc25D-0.1.10/cnc25d/split_gearwheel.py
################################################################ # header for Python / FreeCAD compatibility ################################################################ import cnc25d_api cnc25d_api.importing_freecad() #print("FreeCAD.Version:", FreeCAD.Version()) #FreeCAD.Console.PrintMessage("Hello from PrintMe...
PypiClean
/FlaskEx-0.0.66.tar.gz/FlaskEx-0.0.66/flaskex/ex/static/bootstrap/js/bootstrap.min.js
if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])r...
PypiClean
/HiCAssembler-1.1.1.tar.gz/HiCAssembler-1.1.1/README.md
HiCAssembler ============ Hi-C scaffolding tool to assemble contigs/scaffolds into complete chromosomes ----------------------------------------------------------------------------- This software uses Hi-C sequencing data to assemble contigs/scaffolds into complete chromosomes. The assembly process consists of the fo...
PypiClean
/Foundations-2.1.0.tar.gz/Foundations-2.1.0/foundations/globals/constants.py
#********************************************************************************************************************** #*** Future imports. #********************************************************************************************************************** from __future__ import unicode_literals #*****************...
PypiClean
/Mezzanine-6.0.0.tar.gz/Mezzanine-6.0.0/mezzanine/core/static/mezzanine/tinymce/langs/ca.js
tinymce.addI18n('ca',{ "Cut": "Retalla", "Heading 5": "Encap\u00e7alament 5", "Header 2": "Cap\u00e7alera 2", "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "El vostre navegador no suporta l'acc\u00e9s directe al portaobjectes. Si us plau, feu ser...
PypiClean
/Cydra-0.2.tar.gz/Cydra-0.2/cydra/repository/git.py
import os, os.path, stat import subprocess import re import cydra from cydra.component import Component, implements, ExtensionPoint from cydra.repository import IRepository, Repository, RepositoryParameter from cydra.error import CydraError, InsufficientConfiguration, UnknownRepository from cydra.permission import IP...
PypiClean
/FicusFramework-3.1.0.post2.tar.gz/FicusFramework-3.1.0.post2/src/factdatasource/dao/jdbc/MultipleJdbcDatasource.py
import threading from urllib.parse import unquote from sqlalchemy import create_engine from sqlalchemy.orm import Session, sessionmaker from urllib3.util import url, Url from api.exceptions import IllegalArgumentException from api.model.FactDatasource import JdbcTypeEnum, JdbcDriverEnum, FactDatasourceTypeEnum from c...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dijit/form/_FormSelectWidget.js.uncompressed.js
define("dijit/form/_FormSelectWidget", [ "dojo/_base/array", // array.filter array.forEach array.map array.some "dojo/aspect", // aspect.after "dojo/data/util/sorter", // util.sorter.createSortFunction "dojo/_base/declare", // declare "dojo/dom", // dom.setSelectable "dojo/dom-class", // domClass.toggle "dojo/_b...
PypiClean
/Loglan-DB-0.1.21.tar.gz/Loglan-DB-0.1.21/loglan_db/model_db/base_event.py
from __future__ import annotations from loglan_db import db from loglan_db.model_db import t_name_events from loglan_db.model_init import InitBase, DBBase __pdoc__ = { 'BaseEvent.created': False, 'BaseEvent.updated': False, } class BaseEvent(db.Model, InitBase, DBBase): """Base Event's DB Model Describe...
PypiClean
/BigJob2-0.54.post73.tar.gz/BigJob2-0.54.post73/bigjob/job_plugin/mesos/mesos_executor.py
import threading import os, sys import logging import bigjob import bigjob.bigjob_agent import json import time try: import mesos import mesos_pb2 except: logging.error("Mesos libraries NOT found") class BigJobExecutor(mesos.Executor): """ Mesos executor implementation that runs BigJob. """ ...
PypiClean
/FanFicFare-4.27.0.tar.gz/FanFicFare-4.27.0/fanficfare/adapters/adapter_wwwnovelallcom.py
from __future__ import absolute_import import logging import re import json # py2 vs py3 transition from .base_adapter import BaseSiteAdapter, makeDate from bs4 import Comment from ..htmlcleanup import fix_excess_space, stripHTML from .. import exceptions as exceptions from ..dateutils import parse_relative_date_str...
PypiClean
/Flask_AdminLTE3-1.0.9-py3-none-any.whl/flask_adminlte3/static/plugins/inputmask/jquery.inputmask.min.js
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],t);else{var i="object"==typeof exports?t(require("jquery")):t(e.jQuery);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(self,(function(e){...
PypiClean
/Automated_cartography-0.0.2-py3-none-any.whl/robot/LSC_Client.py
import socket import threading import time class LSC_Client(object): ip_port = ('127.0.0.1', 9029) sock = None th1 = None Stop = False def __init__(self): self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect(self.ip_port) self.th1 = threading.Th...
PypiClean
/FeinCMS-23.8.0.tar.gz/FeinCMS-23.8.0/feincms/admin/filters.py
from django.contrib.admin.filters import ChoicesFieldListFilter from django.db.models import Count from django.utils.encoding import smart_str from django.utils.safestring import mark_safe from django.utils.translation import gettext as _ from feincms.utils import shorten_string class ParentFieldListFilter(Choices...
PypiClean
/Apycula-0.9.0a1.tar.gz/Apycula-0.9.0a1/clock_experiments.ipynb
``` import tiled_fuzzer import codegen import pindef import bslib import chipdb import fuse_h4x import gowin_unpack from wirenames import wirenames from PIL import Image import numpy as np import pickle def dff(mod, cst, row, col, clk=None): "make a dff with optional clock" name = tiled_fuzzer.make_name("DFF",...
PypiClean
/Kato-FlaskAppBuilder-1.1.14.tar.gz/Kato-FlaskAppBuilder-1.1.14/flask_appbuilder/fieldwidgets.py
from wtforms.widgets import HTMLString, html_params from wtforms import fields, widgets, TextField from flask_babel import lazy_gettext as _ class DatePickerWidget(object): """ Date Time picker from Eonasdan GitHub """ data_template = ('<div class="input-group date appbuilder_date" id="datepicker">' ...
PypiClean
/NREL_farms-1.0.5-py3-none-any.whl/farms/farms_dni.py
import numpy as np def TDD2(Z, Ftotal, F1): ''' Compute surface reflection that falls in the circumsolar region. A parameterization of Eq. (S4) in Xie et al (2020) is used. All arrays should have the same shape (n_times) or (n_times, n_lats, n_lons) Parameters ----------- Z: np.ndar...
PypiClean
/GoogleAppEngineCloudStorageClient-1.9.22.1.tar.gz/GoogleAppEngineCloudStorageClient-1.9.22.1/distribute_setup.py
import os import shutil import sys import time import fnmatch import tempfile import tarfile import optparse from distutils import log try: from site import USER_SITE except ImportError: USER_SITE = None try: import subprocess def _python_cmd(*args): args = (sys.executable,) + args r...
PypiClean
/DNBC4tools-2.1.0.tar.gz/DNBC4tools-2.1.0/dnbc4tools/atac/analysis.py
import os,argparse from dnbc4tools.tools.utils import str_mkdir,judgeFilexits,change_path,logging_call,read_json,bin_path from dnbc4tools.__init__ import __root_dir__ class Analysis: def __init__(self, args: argparse.Namespace) -> None: """ Initialize the Analysis class. Args: - ar...
PypiClean
/IsPycharmRun-1.0.tar.gz/IsPycharmRun-1.0/pb_py/sc_msg_playershow_pb2.py
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() import msg_base_pb2 as ...
PypiClean
/Lagranto-0.3.1.tar.gz/Lagranto-0.3.1/docs/install.rst
Installation ------------ Using conda ~~~~~~~~~~~ conda install -c conda-forge lagranto Using pip ~~~~~~~~~ Ideally install it in a virtual environment. See for example virtualenvwrapper_. .. code:: bash pip install Lagranto Then you can install the dependencies for testing or the documentations as follow: ...
PypiClean
/AI-Starter-3.0.7.tar.gz/AI-Starter-3.0.7/README.md
![DXC](https://raw.githubusercontent.com/npulagam/AI-Starter/master/DXC_Logo.png) <img src="https://raw.githubusercontent.com/npulagam/AI-Starter/master/Industrialized_AI_Animation.gif" height="500" width="900" ></img> # DXC Industrialized AI Starter DXC Industrialized AI Starter makes it easy for you to deploy you...
PypiClean
/Boxley-0.1.5.tar.gz/Boxley-0.1.5/README
Boxley is a git-like CLI for syncing files with Dropbox. ## About Boxley allows you to add any file to a list of files (`paths.json`) that can then be synchronized with Dropbox. When adding a file to this list, the directory in Dropbox that the file will be synced to can be specified. Files can also be organized into...
PypiClean
/Another_One_Messenger_Server-0.9.tar.gz/Another_One_Messenger_Server-0.9/src/server/database.py
from sqlalchemy import create_engine, Table, Column, Integer, String, MetaData, ForeignKey, DateTime, Text from sqlalchemy.orm import mapper, sessionmaker import datetime class ServerStorage: ''' Класс - оболочка для работы с базой данных сервера. Использует SQLite базу данных, реализован с помощью SQ...
PypiClean
/Heterogeneous_Highway_Env-0.0.3-py3-none-any.whl/src/road/road.py
import numpy as np import logging from typing import List, Tuple, Dict, TYPE_CHECKING, Optional from highway_env.road.lane import LineType, StraightLane, AbstractLane, lane_from_config from highway_env.vehicle.objects import Landmark if TYPE_CHECKING: from highway_env.vehicle import kinematics, objects logger = ...
PypiClean
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/web/media/js/mathjax/extensions/MathMenu.js
(function(c,g,k,f,b){var p="2.0.1";var j=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:j};var n=c.Browser.isPC,l=c.Browser.isMSIE,e=((document.documentMode||0)>8);var i=(n?null:"5px");var o=c.CombineConfig("MathMenu",{delay:150,helpURL:"http://www.mathjax.org/help-v2/user/",closeImg:k.fil...
PypiClean
/LZBEAT-0.13.1.tar.gz/LZBEAT-0.13.1/econml/iv/nnet/_deepiv.py
import numpy as np from ..._cate_estimator import BaseCateEstimator from ...utilities import check_input_arrays, _deprecate_positional, deprecated, MissingModule try: import keras from keras import backend as K import keras.layers as L from keras.models import Model except ImportError as exn: keras ...
PypiClean
/dirtrav-1.0.0.tar.gz/dirtrav-1.0.0/docs/tutorial/install.rst
Make the Project Installable ============================ Making your project installable means that you can build a *distribution* file and install that in another environment, just like you installed Flask in your project's environment. This makes deploying your project the same as installing any other library, so y...
PypiClean
/Logbook-1.6.0-cp37-cp37m-musllinux_1_1_x86_64.whl/logbook/base.py
import os import sys import traceback from collections import defaultdict from datetime import datetime from itertools import chain from weakref import ref as weakref from logbook.concurrency import greenlet_get_ident, thread_get_ident, thread_get_name from logbook.helpers import cached_property, parse_iso8601, to_saf...
PypiClean
/Netfoll_TL-2.0.1-py3-none-any.whl/netfoll_tl/tl/functions/langpack.py
from ...tl.tlobject import TLObject from ...tl.tlobject import TLRequest from typing import Optional, List, Union, TYPE_CHECKING import os import struct from datetime import datetime class GetDifferenceRequest(TLRequest): CONSTRUCTOR_ID = 0xcd984aa5 SUBCLASS_OF_ID = 0x52662d55 def __init__(self, lang_pac...
PypiClean
/CCC-2.0.1.tar.gz/CCC-2.0.1/ccc/marketing/autodialer/views.py
from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import get_object_or_404, redirect, render from django.urls import reverse from django.utils.decorators import method_decorator from django.views import View from django.views.generic import TemplateView from xlrd import XLRDError from ccc...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/av/widget/ProgressSlider.js
define("dojox/av/widget/ProgressSlider",["dojo","dijit","dijit/_Widget","dijit/_TemplatedMixin"],function(_1,_2){ _1.declare("dojox.av.widget.ProgressSlider",[_2._Widget,_2._TemplatedMixin],{templateString:_1.cache("dojox.av.widget","resources/ProgressSlider.html"),postCreate:function(){ this.seeking=false; this.handle...
PypiClean
/Cohorte-Herald-0.0.3.tar.gz/Cohorte-Herald-0.0.3/herald/remote/herald_xmlrpc.py
# Module version __version_info__ = (0, 0, 3) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format __docformat__ = "restructuredtext en" # ------------------------------------------------------------------------------ # Herald import herald.beans as beans import herald.remote # iP...
PypiClean
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/xla/build.py
import os from ..distributed import get_rank, get_world_size, is_distributed from .compile import MeshComputation, PmapComputation from .device import get_xla_backend_and_device from .distribute import initialize from .ir_utils import DropoutMaskCanonicalizer, RngKeyAdder, TraceResult from .lib import xla_client as xc...
PypiClean
/NanoSV-1.2.4.tar.gz/NanoSV-1.2.4/README.rst
NanoSV User Guide ================= Table of Contents ----------------- * `NanoSV <#nanosv>`_ * `Summary <#summary>`_ * `Installation <#installation>`_ * `Citation <#citation>`_ * `Pre-processing <#pre-processing>`_ * `Basecalling <#basecalling>`_ * `Mapping <#mapping>`_ * `LAST <#last-mapping>`_ ...
PypiClean
/EARL-pytorch-0.5.1.tar.gz/EARL-pytorch-0.5.1/rlgym/version.py
__version__ = '1.1.0' release_notes = { 'beta': """ - This version contains numerous untested and potentially breaking changes. Run at your own risk. """, '1.1.0': """ - Added ActionParsers, which allow you to define custom action spaces - Lolaapk3 - Fixed quaternion to euler angle convers...
PypiClean
/HieraPy-0.0.3.tar.gz/HieraPy-0.0.3/hierapy/__init__.py
import yaml class HieraPy(object): def __init__(self, config_file, folder, lazy_load = True): self.__folder = folder self.__config_file = config_file self.__loaded = False self.__config = dict() if not lazy_load: self.__load_config() def get(self, key, defa...
PypiClean
/Decision_tree_zrq_1-0.0.2.tar.gz/Decision_tree_zrq_1-0.0.2/neupy_core_model_api_src/Decision_tree.py
# coding:UTF-8 ''' Date:2020-03-03 @author: zhangruiqin ''' from math import pow class node: '''树的节点的类 ''' def __init__(self, fea=-1, value=None, results=None, right=None, left=None): self.fea = fea # 用于切分数据集的属性的列索引值 self.value = value # 设置划分的值 self.results = results # 存储叶节点所属...
PypiClean
/NeuroDynamics-0.1.1.tar.gz/NeuroDynamics-0.1.1/brainpy/connectivity/methods.py
import numpy as onp from .base import Connector from .. import numpy as np __all__ = ['One2One', 'All2All', 'GridFour', 'grid_four', 'GridEight', 'grid_eight', 'GridN', 'FixedPostNum', 'FixedPreNum', 'FixedProb', 'GaussianProb', 'GaussianWeight', 'DOG', ...
PypiClean
/Audio_classification-0.5.tar.gz/Audio_classification-0.5/Audio_classification/Audio_classification.py
import librosa import librosa.display import matplotlib.pyplot as plt import numpy as np import pandas as pd import os from keras import models from keras.layers import Dense, Activation,Dropout from keras.models import Sequential from keras.utils import to_categorical class audios: def load_features(data_path): ...
PypiClean
/Navix-0.3.10.tar.gz/Navix-0.3.10/navix/observations.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not ...
PypiClean
/FishFishJump-0.2.3.tar.gz/FishFishJump-0.2.3/fish_searcher/views/search.py
import datetime import json import random import time from concurrent.futures import ThreadPoolExecutor import redis from common_cache import Cache from flask import Blueprint, request, current_app, render_template, abort from fish_core.search_engine import ElasticsearchClient, create_multiple_queries_statement, appe...
PypiClean
/KPyGithub-1.32a1.tar.gz/KPyGithub-1.32a1/github/RateLimit.py
# ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
PypiClean
/Hyperkit-0.2.zip/Hyperkit-0.2/hyperkit/cloudinit.py
import os import tempfile import logging import StringIO import yaml import random import crypt from hyperkit.hypervisor.command import Command logger = logging.getLogger(__name__) class GenIsoImage(Command): command_name = "genisoimage" subcommands = { "generate": ["-output", "{pathname}", "-volid...
PypiClean
/MIAOlib-0.1.0.tar.gz/MIAOlib-0.1.0/miaolib/scheme.py
import inspect from typing import List available_return_type = [str, int, list, dict, object, bool] def to_camel_case(snake_str): components = snake_str.split('_') return components[0] + ''.join(x.title() for x in components[1:]) def filter_dict(dict: dict, ignore_keys=[]): return {k: v for k, v in dic...
PypiClean
/Dokang-0.10.1-py3-none-any.whl/dokang/api.py
from __future__ import unicode_literals import logging import os from dokang.backends import whoosh from dokang import harvesters logger = logging.getLogger(__name__) # This API is very dependent on the Whoosh backend. This is not # entirely unrelated to the fact that Whoosh is the only backend. # There is a pla...
PypiClean
/NanoscoPy-0.0.13-py3-none-any.whl/nanoscopy/plot/PlotGen - Backup.py
import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, AutoMinorLocator) import pandas as pd import numpy as np import os class PlotGen(): def __init__(self , data , data_labels = None , axis_labels = None , scale_factors = None): """ data: Numpy array of 2-column Numpy con...
PypiClean
/LPP0D-0.1.1.tar.gz/LPP0D-0.1.1/backend/solve_and_post_proc.py
from scipy.constants import k, m_e, e, epsilon_0, c, pi import numpy as np import datetime as dt import math from scipy.special import jv from scipy.integrate import odeint from scipy.optimize import brentq import matplotlib.pyplot as plt from scikits.odes import ode from toolbox_functions import do_profile #, get_num...
PypiClean
/Mopidy_ALSAMixer-2.0.1-py3-none-any.whl/mopidy_alsamixer/mixer.py
import logging import math import select import threading import alsaaudio import gi import pykka gi.require_version("GstAudio", "1.0") # noqa from gi.repository import GstAudio # noqa isort:skip from mopidy import exceptions, mixer # noqa isort:skip logger = logging.getLogger(__name__) class AlsaMixer(pykka....
PypiClean
/GladTeX-3.1.0.tar.gz/GladTeX-3.1.0/gleetex/pandoc.py
import json from .htmlhandling import ParseException def __extract_formulas(formulas, ast): """Recursively extract 'Math' elements from the given AST and add them to `formulas (list)`.""" if isinstance(ast, list): for item in ast: __extract_formulas(formulas, item) elif isinstance(...
PypiClean
/Curtain-0.3.tar.gz/Curtain-0.3/README.txt
Curtain ======= Curtain is a simple, very small, compiled-to-python templating language with just about the same characteristics of TAL, METAL and Zope i18n extensions. Installation ------------ Curtain is based on setuptools. To install it: $ ./setup.py install To test it: $ ./setup.py test or, if you want to h...
PypiClean
/Hatak_Auth-0.2.6.tar.gz/Hatak_Auth-0.2.6/src/haplugin/auth/models.py
from hashlib import sha1 import os from haplugin.sql import Base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declared_attr from .db_tables import users_2_permissions class BasePermission(object): __tablename__ = 'permissions' ...
PypiClean
/Flask-WXApp-0.1.3.tar.gz/Flask-WXApp-0.1.3/README.rst
微信小程序Flask扩展 =================== - `微信文档 <https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-login.html>`_ Installation ------------ .. code:: pip install Flask-WXApp Configuration ------------- Your configuration should be declared within your Flask config. .. code:: python WX_APPID = 'your appid' ...
PypiClean
/HuTao%20agent-1.0.3.tar.gz/HuTao agent-1.0.3/walnut_agent/script/app_handle.py
__author__ = 'chenbo' import asyncio import os import platform import signal import subprocess import time import select import traceback from pathlib import Path from typing import List, Union, Any from queue import Queue import tidevice try: import msvcrt import _winapi _mswindows = True except Module...
PypiClean
/Alarmageddon-1.1.2-py3-none-any.whl/alarmageddon/validations/graphite.py
import datetime import requests from alarmageddon.validations.validation import Validation from alarmageddon.validations.graphite_expectations import \ LessThanExpectation, \ GreaterThanExpectation, \ AverageLessThanExpectation, \ AverageGreaterThanExpectation import logging import six logger = lo...
PypiClean
/Beat_ML1-0.13.1.tar.gz/Beat_ML1-0.13.1/econml/solutions/causal_analysis/_causal_analysis.py
import warnings from collections import OrderedDict, namedtuple import joblib import lightgbm as lgb from numba.core.utils import erase_traceback import numpy as np from numpy.lib.function_base import iterable import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from sklearn.compose import Colu...
PypiClean
/ApiLogicServer-9.2.18-py3-none-any.whl/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/js/3668.cd0becc2.chunk.js
"use strict";(self.webpackChunkreact_admin_upgrade=self.webpackChunkreact_admin_upgrade||[]).push([[3668],{63668:function(e,t,n){n.r(t),n.d(t,{conf:function(){return r},language:function(){return s}});var r={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPa...
PypiClean
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/integrations/handlers/bigquery_handler/bigquery_handler.py
import os import json from collections import OrderedDict from google.cloud import bigquery from google.oauth2 import service_account from sqlalchemy_bigquery.base import BigQueryDialect from mindsdb_sql.parser.ast.base import ASTNode from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender from mindsdb.inte...
PypiClean
/LDB_LAPACK-0.1.tar.gz/LDB_LAPACK-0.1/ldb/lapack/lapack.py
from __future__ import absolute_import from ldb.lapack._lapack import ffi, lib class LAPACKType(object): def __init__(self, type_character, ctype_name): self.type_character = type_character, self.ctype_name = ctype_name def make_array(self, n): return ffi.new("%s[]"%(self.ctype_name,...
PypiClean
/maxbot-0.3.0b2-py3-none-any.whl/maxbot/cli/_logging.py
import logging import logging.handlers import sys import click def configure_logging(target, verbosity): """Configure CLI logging. :param str target: The name of the logger and its arguments. :param int verbosity: Output verbosity. """ if verbosity < -1: logging.disable() return ...
PypiClean
/KMLPlus-3.0.0b2.tar.gz/KMLPlus-3.0.0b2/kmlplus/kml.py
from typing import Union import simplekml from kmlplus.geo import PointFactory from kmlplus.shapes import Polyhedron, Circle, Cylinder, LineString class KmlPlus: """ KmlPlus is the main class for creating instance 2D and 3D shapes with KML. The class has methods for creating Points, LineString, Circle, ...
PypiClean
/MuPhyN-0.1.1.post4-py3-none-any.whl/muphyn/packages/unit_test/SIM_SFT_0010.py
from muphyn.packages.core.application import DataType, Signal, Scheduler, SchedulerParams from .unit_test import get_boxes_libraries, get_schedulers_library, simulate # Get library boxesLibraries = get_boxes_libraries() schedulersLibraries = get_schedulers_library() print("Creation of the scheduler") scheduler : Sch...
PypiClean
/HalRing-2.0.4-py3-none-any.whl/halring/apollo/halring_apollo_opr.py
import requests import json import sys from loguru import logger class ApolloOpr: """ apollo配置中心 """ def __init__(self, apolloServer, apolloToken, apolloUser): """ 初始化参数 :param apolloToken: 传入操作权限token :param apolloUser: 传入操作的uums-配置中心账号 """ self._apollo_server ...
PypiClean
/NeodroidAgent-0.4.8-py36-none-any.whl/neodroidagent/common/session_factory/vertical/procedures/training/off_policy_episodic.py
import math from itertools import count from pathlib import Path from typing import Union import numpy import torch import torchsnooper from draugr.metrics.accumulation import mean_accumulator, total_accumulator from draugr.torch_utilities import TensorBoardPytorchWriter from draugr.writers import MockWriter, Writer ...
PypiClean
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/auxiliary/gradientdescent.py
from scipy import zeros, asarray, sign, array, cov, dot, clip, ndarray from scipy.linalg import inv __author__ = ('Thomas Rueckstiess, ruecksti@in.tum.de' 'Justin Bayer, bayer.justin@googlemail.com') class GradientDescent(object): def __init__(self): """ initialize algorithms with standar...
PypiClean
/DefDAP-0.93.5-py3-none-any.whl/defdap/file_writers.py
import numpy as np import pathlib from typing import Type from defdap.quat import Quat class EBSDDataWriter(object): def __init__(self) -> None: self.metadata = { 'shape': (0, 0), 'step_size': 0., 'acquisition_rotation': Quat(1.0, 0.0, 0.0, 0.0), 'phases'...
PypiClean
/Oasis_Optimization-1.0.2-py3-none-any.whl/Oasis/ga/sort.py
import random def quicksort_front_obj(pop, objcount, obj_array, obj_array_size): # Randomized quick sort routine to sort a population based on a particular # objective chosen q_sort_front_obj(pop, objcount, obj_array, 0, obj_array_size-1) return def q_sort_front_obj(pop, objcount, obj_array, le...
PypiClean
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/methods/invite_links/get_chat_admin_invite_links.py
from typing import Union, Optional, AsyncGenerator import fipper from fipper import raw from fipper import types class GetChatAdminInviteLinks: async def get_chat_admin_invite_links( self: "fipper.Client", chat_id: Union[int, str], admin_id: Union[int, str], revoked: bool = False...
PypiClean
/JaqalPaw-1.2.0a1.tar.gz/JaqalPaw-1.2.0a1/examples/MSGateFrameRotations/Exemplar_MSGateFrameRotations.py
from jaqalpaw.ir.pulse_data import PulseData from jaqalpaw.utilities.helper_functions import discretize_frequency import numpy as np from scipy.special import erf as _erf # Either of these import methods work at the moment, but local doesn't work well. import sys import os from qscout.v1.QSCOUTBuiltins import QSCOUTBu...
PypiClean