id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/MutatorMath-3.0.1.zip/MutatorMath-3.0.1/Lib/mutatorMath/objects/location.py | from __future__ import print_function, division
import math, sys
import itertools, operator
from mutatorMath import __version__
_EPSILON = sys.float_info.epsilon
__all__ = ["Location", "sortLocations"]
def numberToString(value):
# return a nicely formatted string of this value
# return tuples as a tuple-... | PypiClean |
/Final_Project-1.0.tar.gz/Final_Project-1.0/doc/_build/html/_static/underscore-1.3.1.js |
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the server.
var root = this;
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
// Establish the object that gets returned to break out of a loop itera... | PypiClean |
/MPInterfaces_Latest-2.0.3.tar.gz/MPInterfaces_Latest-2.0.3/examples/notebooks/.ipynb_checkpoints/pourbaix-checkpoint.ipynb | ```
"""
This is slightly modified version of the notebook in the pymatgen/examples folder
"""
import numpy as np
from pymatgen.matproj.rest import MPRester
from pymatgen.core.ion import Ion
from pymatgen import Element
from pymatgen.phasediagram.maker import PhaseDiagram
from pymatgen.analysis.pourbaix.entry import P... | PypiClean |
/Mage2Gen-2.3.3.tar.gz/Mage2Gen-2.3.3/mage2gen/snippets/system.py | import os
from .. import Module, Phpclass, Phpmethod, Xmlnode, StaticFile, Snippet, SnippetParam, GraphQlSchema, GraphQlObjectType, GraphQlObjectItem
class SystemSnippet(Snippet):
snippet_label = 'System / Config / Setting'
description = """
System config is used in Magento for storing settings to use in your mod... | PypiClean |
/Kr0nOs-3.4.1.tar.gz/Kr0nOs-3.4.1/kronbot/core/cli.py | import argparse
import asyncio
import logging
import sys
from typing import Optional
from discord import __version__ as discord_version
def confirm(text: str, default: Optional[bool] = None) -> bool:
if default is None:
options = "y/n"
elif default is True:
options = "Y/n"
elif default is... | PypiClean |
/BEATAALU-0.13.1.tar.gz/BEATAALU-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 |
/NREL_farms-1.0.5-py3-none-any.whl/farms/utilities.py | from copy import deepcopy
import pandas as pd
import numpy as np
import os
from warnings import warn
from farms import RADIUS, CLEAR_TYPES, CLOUD_TYPES, SZA_LIM
def check_range(data, name, rang=(0, 1)):
"""Ensure that data values are in correct range."""
if np.nanmin(data) < rang[0] or np.nanmax(data) > rang[... | PypiClean |
/NREL_disco-0.4.2-py3-none-any.whl/disco/cli/common.py |
import logging
import logging.config
import os
import shutil
import click
from jade.exceptions import InvalidParameter, UserAbort
from disco.enums import Scale, Placement
logger = logging.getLogger(__name__)
_ENUM_MAPPING = {
# class to type of value
"placement": (Placement, str),
"scale": (Scale, st... | PypiClean |
/OASYS1-oasyswiser-0.3.22.tar.gz/OASYS1-oasyswiser-0.3.22/orangecontrib/wiser/widgets/gui/ow_wise_widget.py | import sys
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import Qt, QRect
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import QPalette, QColor, QFont
from orangewidget import gui
from orangewidget.settings import Setting
from orangewidget.widget import OWAction
from oasys.widgets import widget
fro... | PypiClean |
/MechElastic-1.2.29-py3-none-any.whl/mechelastic/parsers/qe_thermo_pw_parser.py | import numpy as np
import re
import math
from ..utils.constants import *
from ..utils.elements import ELEMENTS, elements_inversed
from ..comms import printer
from ..tests import symmetry
from ..core import ElasticProperties
from ..core import Structure
def mag(v):
return (v[0]*v[0]+v[1]*v[1]+v[2]*v[2])**0.5
def vo... | PypiClean |
/FrAG-1.1.0.tar.gz/FrAG-1.1.0/frag_pele/AdaptivePELE_repo/AdaptivePELE/analysis/writeNetworkFiles.py | import os
import sys
import argparse
from AdaptivePELE.utilities import utilities
import matplotlib.pyplot as plt
try:
# This might fail for older versions of matplotlib (e.g in life cluster)
plt.style.use("ggplot")
except:
pass
def parseArguments():
desc = "Write the information related to the confor... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/wheat.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def wheat(path):
"""Playfair's Data on Wages and the Price of Wheat
Playfair (1821) used a gra... | PypiClean |
/Fumagalli_Motta_Tarantino_2020-0.5.3.tar.gz/Fumagalli_Motta_Tarantino_2020-0.5.3/Fumagalli_Motta_Tarantino_2020/Models/Extension.py | import Fumagalli_Motta_Tarantino_2020.Models.Types as Types
import Fumagalli_Motta_Tarantino_2020.Models.Base as Base
class ProCompetitive(Base.OptimalMergerPolicy):
"""
Relaxes the assumption (A4), that the innovation of the start-up is always welfare beneficial. Instead, the
innovation is only welfare b... | PypiClean |
/MegEngine-1.13.1-cp37-cp37m-macosx_10_14_x86_64.whl/megengine/jit/tracing.py | import collections
import contextlib
import functools
import itertools
import json
import os
import pickle
import re
import struct
import sys
from collections import OrderedDict, defaultdict
from typing import Any, Sequence
import cv2
import numpy as np
from .. import tensor
from ..core import _imperative_rt as rt
fr... | PypiClean |
/AppiumExtended-0.5.49b0-py3-none-any.whl/appium_extended/appium_extended.py | import logging
import os
import time
from typing import Union, Tuple, Dict, List, Optional, cast, Any
import numpy as np
from PIL import Image
from appium.webdriver.common.appiumby import AppiumBy
from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver import WebElement
from selenium.webdriver.com... | PypiClean |
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imcontrol/controller/controllers/ScanControllerMoNaLISA.py | import traceback
import configparser
import numpy as np
from ast import literal_eval
from ..basecontrollers import SuperScanController
from imswitch.imcommon.view.guitools import colorutils
class ScanControllerMoNaLISA(SuperScanController):
def __init__(self, *args, **kwargs):
super().__init__(*args, *... | PypiClean |
/energon_prometheus_exporter_test-0.0.1-py3-none-any.whl/torchdistill-test/examples/torchvision/object_detection.py | import argparse
import datetime
import io
import os
import time
from contextlib import redirect_stdout
import torch
from torch import distributed as dist
from torch.backends import cudnn
from torch.nn.parallel import DistributedDataParallel
from torch.utils.data._utils.collate import default_collate
from torchvision.m... | PypiClean |
/Mathics_Django-6.0.0-py3-none-any.whl/mathics_django/web/media/js/mathjax/jax/output/SVG/fonts/STIX-Web/fontdata-extra.js | (function(L){var B="2.7.9";var t=L.FONTDATA.DELIMITERS;var s="H",f="V";var ah=[8722,E,0,0,0,-0.26,-0.26];var u="STIXMathJax_Alphabets-bold-italic",G="STIXMathJax_Alphabets-bold",z="STIXMathJax_Alphabets-italic",e="STIXMathJax_Alphabets",S="STIXMathJax_Arrows-bold",x="STIXMathJax_Arrows",g="STIXMathJax_DoubleStruck-bold... | PypiClean |
/Dabo-0.9.16.tar.gz/Dabo-0.9.16/dabo/db/dCursorMixin.py |
import datetime
import time
import re
from decimal import Decimal
import functools
import dabo
import dabo.dConstants as kons
from dabo.dLocalize import _
import dabo.dException as dException
from dabo.dObject import dObject
from dNoEscQuoteStr import dNoEscQuoteStr
from dabo.db.dDataSet import dDataSet
from dabo.lib ... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/address/da_DK/__init__.py | from .. import Provider as AddressProvider
class Provider(AddressProvider):
# Building numbers don't go higher than a 1000
building_number_formats = ("%##", "%#", "%")
street_name_formats = ("{{dk_street_name}}{{street_suffix}}",)
street_address_formats = ("{{street_name}} {{building_number}}",)
... | PypiClean |
/Flask-MDEditor-0.1.4.tar.gz/Flask-MDEditor-0.1.4/flask_mdeditor/static/mdeditor/js/lib/codemirror/mode/scheme/scheme.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 st... | PypiClean |
/MLZ-DESC-1.2.tar.gz/MLZ-DESC-1.2/mlz_desc/plot/plotting.py | __author__ = 'Matias Carrasco Kind'
from numpy import *
import os, sys
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.gridspec as gridspec
import random as rn
import astropy.io.fits as pf
path_src = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
if not path_src in sys.pat... | PypiClean |
/Flask-Bootstraps-3.3.7.8.tar.gz/Flask-Bootstraps-3.3.7.8/flask_bootstraps/forms.py | from dominate import tags
from dominate.util import raw
from flask import current_app
from markupsafe import Markup
from visitor import Visitor
def render_form(form, **kwargs):
r = WTFormsRenderer(**kwargs)
return Markup(r.visit(form))
class WTFormsRenderer(Visitor):
def __init__(self,
... | PypiClean |
/MLMetrics-0.2-py3-none-any.whl/mlmetrics/rating.py |
import numpy as np
import pandas as pd
from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score, explained_variance_score
def merge_rating_true_pred(rating_true,
rating_pred,
col_user="user",
col_item="item",
... | PypiClean |
/Caribe-0.9.0.tar.gz/Caribe-0.9.0/README.md |
[](https://opensource.org/licenses/Apache-2.0) [](https://pepy.tech/project/caribe) [](https... | PypiClean |
/19CS30055_package-0.0.6-py3-none-any.whl/my_package/data/dataset.py | import numpy as np
import json
from matplotlib import image
from matplotlib import pyplot
from pathlib import Path
class Dataset(object):
'''
A class for the dataset that will return data items as per the given index
'''
def __init__(self, annotation_file, transforms = None):
self.annotati... | PypiClean |
/HTML4Vision-0.4.3.tar.gz/HTML4Vision-0.4.3/README.md | # HTML4Vision
A simple HTML visualization tool for computer vision research
[https://github.com/mtli/HTML4Vision](https://github.com/mtli/HTML4Vision)
<p align="center">
<img alt="demo" src="examples/sort.png" width="500px">
</p>
- Easy [table description and generation](#table-description-and-generation) for alg... | PypiClean |
/NlpToolkit-MorphologicalAnalysis-1.0.47.tar.gz/NlpToolkit-MorphologicalAnalysis-1.0.47/MorphologicalAnalysis/MorphotacticEngine.py | from Dictionary.TxtWord import TxtWord
from Dictionary.Word import Word
from Language.TurkishLanguage import TurkishLanguage
class MorphotacticEngine:
@staticmethod
def resolveD(root: TxtWord,
formation: str,
formationToCheck: str) -> str:
if root.isAbbreviation():
... | PypiClean |
/Authlib-1.2.1.tar.gz/Authlib-1.2.1/authlib/integrations/requests_client/oauth1_session.py | from requests import Session
from requests.auth import AuthBase
from authlib.oauth1 import (
SIGNATURE_HMAC_SHA1,
SIGNATURE_TYPE_HEADER,
)
from authlib.common.encoding import to_native
from authlib.oauth1 import ClientAuth
from authlib.oauth1.client import OAuth1Client
from ..base_client import OAuthError
from ... | PypiClean |
/Hikka_TL_New-2.0.4-py3-none-any.whl/hikkatl/tl/custom/inlineresults.py | import time
from .inlineresult import InlineResult
class InlineResults(list):
"""
Custom class that encapsulates :tl:`BotResults` providing
an abstraction to easily access some commonly needed features
(such as clicking one of the results to select it)
Note that this is a list of `InlineResult
... | PypiClean |
/FastNLP-1.0.1.tar.gz/FastNLP-1.0.1/fastNLP/core/collators/packer_unpacker.py | from collections import defaultdict
from functools import reduce
from typing import Sequence, Mapping, Dict
__all__ = []
class MappingPackerUnpacker:
@staticmethod
def unpack_batch(batch:Sequence[Mapping], ignore_fields:set, input_fields:Dict)->Dict:
"""
将 Sequence[Mapping] 转为 Dict 。例如 [{'a': ... | PypiClean |
/LiPD-0.2.8.9.tar.gz/LiPD-0.2.8.9/docs/_build/html/searchindex.js | Search.setIndex({docnames:["index","source/lipd","source/modules","source/readme"],envversion:53,filenames:["index.rst","source/lipd.rst","source/modules.rst","source/readme.rst"],objects:{"":{lipd:[1,0,0,"-"]},"lipd.bag":{create_bag:[1,1,1,""],finish_bag:[1,1,1,""],open_bag:[1,1,1,""],resolved_flag:[1,1,1,""],validate... | PypiClean |
/FrAG-1.1.0.tar.gz/FrAG-1.1.0/frag_pele/Analysis/interaction_detector.py | import sys
import os
import glob
import pandas as pd
import argparse
import prody
def parse_arguments():
"""
Parse user arguments
Output: list with all the user arguments
"""
# All the docstrings are very provisional and some of them are old, they would be changed in further s... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/jquery/ui/i18n/jquery-ui-i18n.js | /* Afrikaans initialisation for the jQuery UI date picker plugin. */
/* Written by Renier Pretorius. */
jQuery(function($){
$.datepicker.regional['af'] = {
closeText: 'Selekteer',
prevText: 'Vorige',
nextText: 'Volgende',
currentText: 'Vandag',
monthNames: ['Januarie','Februarie','Maart','April','Mei','Juni... | PypiClean |
/MCsniperPY-3.5-py3-none-any.whl/mcsniperpy/util/classes/config.py | import configparser
import os
from pathlib import Path
from ..logs_manager import Logger as log
from ..utils import close
MCSNIPERPY_BACKEND_DIR = os.path.join(str(Path.home()), ".mcsniperpy")
MCSNIPERPY_CONFIG_FILE_PATH = os.path.join(
MCSNIPERPY_BACKEND_DIR, "backend_config.ini")
DEFAULT_ACCOUNTS_FILE = """Cle... | PypiClean |
/Blocks%20and%20Bullets-0.1.tar.gz/Blocks and Bullets-0.1/BlocksandBullets/__init__.py | import os
import random
def clear():
import os
if os.name == "posix":
os.system('clear')
elif os.name in ("nt", "dos", "ce"):
os.system('CLS')
else:
print '\n' * 100
block = []
blockref = {0:" ", 1:"#"}
for i in xrange(50):
block.append([])
for j in xrange(30):
bl... | PypiClean |
/BACKSTABBING-0.0.8-py3-none-any.whl/src/server_game.py | import math
import threading
import json
import time
from src.server_constants import *
from src.server_player import *
class Game():
'''A class to handle all operations of gameplay'''
def __init__(self, connection):
"""
This is the Initialzation of the Game class
Parameters
... | PypiClean |
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/digraph.py |
from __future__ import print_function
import sys
import math
import networkx
import random
import numpy as np
import logging
import yaplotlib as yp
# Dijkstra
import heapq
def flatten(L): # Flatten linked list of form [0,[1,[2,[]]]]
while len(L) > 0:
yield L[0]
L = L[1]
# modified from ... | PypiClean |
/Chinese-RFID-Access-Control-Library-0.1.2.tar.gz/Chinese-RFID-Access-Control-Library-0.1.2/README.md | Chinese RFID Access Control Library
========================
This library allows python to control one of the most common RFID Access Control Systems sold in China. Now you can integrate an access
control system with your software to do things like remove an user when they haven't paid their bill.
The goal of this pr... | PypiClean |
/DeepPhysX.Sofa-22.12.1.tar.gz/DeepPhysX.Sofa-22.12.1/examples/demos/Liver/UNet/Environment/LiverValidation.py | import os
import sys
import numpy as np
# Session related imports
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from LiverTraining import LiverTraining
from parameters import p_grid, p_liver
class LiverValidation(LiverTraining):
def __init__(self,
as_tcp_ip_client=True,
... | PypiClean |
/KratosSwimmingDEMApplication-9.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/KratosMultiphysics/SwimmingDEMApplication/pfem_fluid_DEM_coupling_solver.py | import os
#import kratos core and applications
import KratosMultiphysics
import KratosMultiphysics.PfemFluidDynamicsApplication as KratosPfemFluid
from KratosMultiphysics.PfemFluidDynamicsApplication.pfem_fluid_solver import PfemFluidSolver
def CreateSolver(model, parameters):
return PfemFluidDEMcouplingSolver(mo... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/job/hy_AM/__init__.py | from .. import Provider as BaseProvider
class Provider(BaseProvider):
jobs = (
"Ակադեմիական գրադարանավար",
"Հաշվապահ",
"Դերասան",
"Ասեղնաբույժ",
"Ադմինիստրատոր",
"Ավիացիոն ինժեներ",
"Գյուղատնտեսական խորհրդատու",
"Գյուղատնտեսական տեխնիկ",
"Օդա... | PypiClean |
/MetaGram-2.0.2.tar.gz/MetaGram-2.0.2/pyrogram/methods/messages/send_voice.py |
import os
import re
from datetime import datetime
from typing import Union, BinaryIO, List, Optional, Callable
import pyrogram
from pyrogram import StopTransmission, enums
from pyrogram import raw
from pyrogram import types
from pyrogram import utils
from pyrogram.errors import FilePartMissing
from pyrogram.file_id i... | PypiClean |
/ESMValTool-2.9.0-py3-none-any.whl/esmvaltool/diag_scripts/radiation_budget/seasonal_radiation_budget.py |
import csv
import logging
import os
import iris
from esmvaltool.diag_scripts.shared import group_metadata, run_diagnostic
SEASONS = {0: "djf", 1: "mam", 2: "jja", 3: "son"}
def organise_seasonal_data(model_data):
"""Return the seasonal data from the cubes.
Parameters
----------
model_data : :clas... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/doctor_contacts.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def doctor_contacts(path):
"""Contacts With Medical Doctor
a cross-section from 1977–1978
*... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/plugins/codesnippet/lib/highlight/CHANGES.md | ## Version 8.0 beta
This new major release is quite a big overhaul bringing both new features and
some backwards incompatible changes. However, chances are that the majority of
users won't be affected by the latter: the basic scenario described in the
README is left intact.
Here's what did change in an incompatible w... | PypiClean |
/LabExT_pkg-2.2.0.tar.gz/LabExT_pkg-2.2.0/LabExT/View/MainWindow/MainWindowView.py | import logging
from platform import system
from tkinter import Frame, Menu, Checkbutton, \
Label, StringVar, OptionMenu, LabelFrame, Button, scrolledtext, Entry, \
NORMAL, DISABLED
from LabExT.Logs.LoggingWidgetHandler import LoggingWidgetHandler
from LabExT.Utils import get_labext_version
from LabExT.View.Con... | PypiClean |
/Auptimizer-2.0.tar.gz/Auptimizer-2.0/src/aup/Proposer/spearmint/chooser/GPConstrainedEIChooser.py | import os
from .. import gp
import sys
from .. import util
import tempfile
import numpy as np
import math
import numpy.random as npr
import scipy.linalg as spla
import scipy.stats as sps
import scipy.optimize as spo
import pickle
import matplotlib.pyplot as plt
import multiprocessing
import copy
from .... | PypiClean |
/Maisie-0.1.6-py3-none-any.whl/maisie/cli/models.py | import click
from terminaltables import SingleTable
from maisie import Models
from maisie.utils.misc import Transform
from colorama import Fore
import pickle
DEFAULT_DISPLAY_ATTRIBUTES = ["id", "user", "name", "created", "metrics", "visibility"]
@click.group()
def models():
pass
@click.command()
@click.opt... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/integrations/handlers/mendeley_handler/mendeley_handler.py | from mindsdb_sql import parse_sql
import pandas as pd
from mendeley import Mendeley
from mindsdb.integrations.libs.api_handler import APIHandler, FuncParser
from mendeley.session import MendeleySession
from mindsdb.integrations.handlers.mendeley_handler.mendeley_tables import CatalogSearchTable
from mindsdb.utilities ... | PypiClean |
/Files.com-1.0.1051-py3-none-any.whl/files_sdk/models/action_webhook_failure.py | import builtins
import datetime
from files_sdk.api import Api
from files_sdk.exceptions import InvalidParameterError, MissingParameterError, NotImplementedError
class ActionWebhookFailure:
default_attributes = {
}
def __init__(self, attributes=None, options=None):
if not isinstance(attributes, dic... | PypiClean |
/dirtrav-1.0.0.tar.gz/dirtrav-1.0.0/docs/templating.rst | Templates
=========
Flask leverages Jinja2 as its template engine. You are obviously free to use
a different template engine, but you still have to install Jinja2 to run
Flask itself. This requirement is necessary to enable rich extensions.
An extension can depend on Jinja2 being present.
This section only gives a ... | PypiClean |
/Hyperion-0.9.10.tar.gz/Hyperion-0.9.10/docs/setup/photon_numbers.rst | Choosing the number of photons wisely
=====================================
.. note:: This section is incomplete at this time, and only covers choosing
the photon numbers for the specific energy/temperature calculation.
As described in :doc:`../setup/setup_conf` and
:doc:`../advanced/advanced_conf`, the num... | PypiClean |
/NetFetch-3.0.3.tar.gz/NetFetch-3.0.3/README.md | # NetFetch
Networked file storage and retrieval with optional password protection and compression using Redis.
Files are stored with a key of originating hostname and an absolute path to filename.
Files may be stored with a password, in which they are encrypted and the same password must be used to retrieve the data... | PypiClean |
/FireWorks-2.0.3.tar.gz/FireWorks-2.0.3/fireworks/flask_site/static/js/jquery.jsonview.js | (function(jQuery) {
var $, Collapser, JSONFormatter, JSONView;
JSONFormatter = (function() {
function JSONFormatter(options) {
if (options == null) {
options = {};
}
this.options = options;
}
JSONFormatter.prototype.htmlEncode = function(html) {
if (html !== null) {
... | PypiClean |
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/build/inline_copy/tqdm/tqdm/gui.py | from __future__ import absolute_import, division
import re
from warnings import warn
# to inherit from the tqdm class
from .std import TqdmExperimentalWarning
from .std import tqdm as std_tqdm
# import compatibility functions and utilities
from .utils import _range
__author__ = {"github.com/": ["casperdcl", "lrq3000... | PypiClean |
/Gbtestapi0.3-0.1a10-py3-none-any.whl/gailbot/core/engines/whisperEngine/core.py |
import os
from threading import Lock
import json
from typing import List, Dict, Any
from dataclasses import asdict
import torch
import whisper_timestamped as whisper
from whisper_timestamped.transcribe import force_cudnn_initialization
from .parsers import (
parse_into_full_text,
parse_into_word_dicts,
... | PypiClean |
/FuzzManager-0.5.1-py3-none-any.whl/FTB/Signatures/JSONHelper.py | import numbers
def getArrayChecked(obj, key, mandatory=False):
"""
Retrieve a list from the given object using the given key
@type obj: map
@param obj: Source object
@type key: string
@param key: Key to retrieve from obj
@type mandatory: bool
@param mandatory: If True, throws an exc... | PypiClean |
/Nitrous-0.9.3-py3-none-any.whl/turbogears/errorhandling.py |
__all__ = ['dispatch_error', 'dispatch_error_adaptor', 'try_call',
'run_with_errors', 'default', 'register_handler', 'FailsafeSchema',
'dispatch_failsafe', 'error_handler', 'exception_handler']
import logging
from inspect import getargspec
from itertools import islice
import sys
import cherrypy
# from peak.rul... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/pipe.py |
from meutils.common import *
from meutils.async_utils.common import async2sync_generator, close_event_loop
class Pipe(object):
"""I am very like a linux pipe"""
def __init__(self, function):
self.function = function
functools.update_wrapper(self, function)
def __ror__(self, other):
... | PypiClean |
/LogUniform-2.0.1.tar.gz/LogUniform-2.0.1/README.rst | LogUniform
==========
A simple implementation of the log-uniform and modified log-uniform
distributions.
|License MIT| |Travis build| |PyPI version|
How to use
----------
Install it from pip (**LogUniform** only depends on numpy)
::
pip install LogUniform
and it's ready to use from Python
.. code:: python
... | PypiClean |
/HTMLHexViewer-0.1.2-py3-none-any.whl/htmlhexviewer/templates/script.js | function decimalToHex(d, padding) {
var hex = Number(d).toString(16);
padding = typeof(padding) === "undefined" || padding === null ? padding = 2 : padding;
while (hex.length < padding) {
hex = "0" + hex;
}
return hex;
}
/**
* Find all items with the same index
* @param {Number} index fi... | PypiClean |
/DBLP-Spider-0.0.5.tar.gz/DBLP-Spider-0.0.5/README.md | # DBLP Spider
A spider tool for downloading the DBLP search results into local BibTeX files.
## Installation
```bash
pip3 install -i https://pypi.org/simple/ dblp-spider
```
## Usage
```bash
# Get result from all of the ccf recommandation venues
dblp-spider --keywords "DNS Security" --output result
# Get result fr... | PypiClean |
/GTW-1.2.6.tar.gz/GTW-1.2.6/_RST/_MOM/E_Type.py |
from __future__ import absolute_import, division, print_function, unicode_literals
from _GTW import GTW
from _TFL import TFL
import _GTW._RST.Resource
import _GTW._RST.HTTP_Method
import _GTW._RST.Mime_Type
import _GTW._RST._MOM.Mixin
import _GTW._RST._MOM.Entity
from ... | PypiClean |
/MarkDo-0.3.0.tar.gz/MarkDo-0.3.0/markdo/static/bower/codemirror/mode/erlang/erlang.js |
CodeMirror.defineMIME("text/x-erlang", "erlang");
CodeMirror.defineMode("erlang", function(cmCfg, modeCfg) {
function rval(state,stream,type) {
// distinguish between "." as terminator and record field operator
if (type == "record") {
state.context = "record";
}else{
state.context = false;
... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/regression/xgb.py | from typing import Tuple
import numpy as np
import xgboost
from Orange.base import XGBBase
from Orange.data import Variable, ContinuousVariable, Table
from Orange.preprocess.score import LearnerScorer
from Orange.regression import Learner
__all__ = ["XGBRegressor", "XGBRFRegressor"]
class _FeatureScorerMixin(Learn... | PypiClean |
/EARL-pytorch-0.5.1.tar.gz/EARL-pytorch-0.5.1/rlgym_tools/extra_state_setters/goalie_state.py | from rlgym.utils.state_setters import StateSetter
from rlgym.utils.state_setters import StateWrapper
from rlgym.utils.math import rand_vec3
import numpy as np
from numpy import random as rand
import random
GOAL_X_MAX = 800.0
GOAL_X_MIN = -800.0
PLACEMENT_BOX_X = 5000
PLACEMENT_BOX_Y = 2000
PLACEMENT_BOX_Y_OFFSET = 30... | PypiClean |
/FlexGet-3.9.6-py3-none-any.whl/flexget/ui/v2/dist/assets/16.d99413fe0332d02516c9.js | (this.webpackJsonp=this.webpackJsonp||[]).push([[16],{1126:function(e,n,t){"use strict";t.r(n),t.d(n,"conf",(function(){return r})),t.d(n,"language",(function(){return o}));var r={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",cl... | PypiClean |
/DLRN-0.26.1.tar.gz/DLRN-0.26.1/dlrn/shell.py |
from __future__ import print_function
import argparse
import logging
import multiprocessing
import os
import sys
import tempfile
import time
from copy import deepcopy
from functools import cmp_to_key
from functools import partial
import sh
from six.moves import configparser
from dlrn.build import build_worker
fro... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/world_model/dreamer.py | import numpy as np
import copy
import torch
from torch import nn
from ding.utils import WORLD_MODEL_REGISTRY, lists_to_dicts
from ding.utils.data import default_collate
from ding.model import ConvEncoder
from ding.world_model.base_world_model import WorldModel
from ding.world_model.model.networks import RSSM, ConvDeco... | PypiClean |
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/trackers/strongsort/deep/models/xception.py | from __future__ import division, absolute_import
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.model_zoo as model_zoo
__all__ = ['xception']
pretrained_settings = {
'xception': {
'imagenet': {
'url':
'http://data.lip6.fr/cadene/pretrainedmodels/xception-4... | PypiClean |
/bignumber_to_persianstring_sama-0.0.1-py3-none-any.whl/Bignumber_to_PersianString_sama/BigNumFunc.py |
# region dicts
yekan = {"1": "يک", "2": "دو", "3": "سه", "4": "چهار", "5": "پنج",
"6": "شش", "7": "هفت", "8": "هشت", "9": "نه", "10": "ده",
"11": "یازده", "12": "دوازده", "13": "سیزده", "14": "چهارده", "15": "پانزده",
"16": "شانزده", "17": "هفده", "18": "هجده", "19": "نوزده"}
dahgan = {"2":... | PypiClean |
/Distribution_G_B-0.1.tar.gz/Distribution_G_B-0.1/distributions/Binomialdistribution.py | import math
import matplotlib.pyplot as plt
from .Generaldistribution import Distribution
class Binomial(Distribution):
""" Binomial distribution class for calculating and
visualizing a Binomial distribution.
Attributes:
mean (float) representing the mean value of the distribution
std... | PypiClean |
/LFT-0.1.1-py3-none-any.whl/lft/app/app.py | import asyncio
import os
from abc import ABC, abstractmethod
from enum import Enum
from pathlib import Path
from typing import List, Optional
from lft.app import Node
from lft.app.data import DefaultData
from lft.app.ui.listener import Listener
from lft.app.epoch import RotateEpoch
from lft.consensus.events import Init... | PypiClean |
/Netbase-0.1.23.tar.gz/Netbase-0.1.23/netbase/netbase.py | import locale
import os
import re
import os.path
import dill as pickle # BEST! no more Can't pickle <function
import json
import codecs # codecs.open(file, "r", "utf-8")
try: # pathetic python3 !
from urllib2 import urlopen
from urllib import urlretrieve
except ImportError:
from urllib.request import urlopen, ur... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/lib/daemon.py |
import ast
import os
import sys
import time
import jsonrpclib
from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer, SimpleJSONRPCRequestHandler
from version import ELECTRUM_VERSION
from network import Network
from util import json_decode, DaemonThread
from util import print_msg, print_error, print_stderr, ... | PypiClean |
/AIFloodMaster-1.1.0-py3-none-any.whl/FloodMaster/utils/DataPreprocessor.py | import pandas as pd
import numpy as np
import datetime
from typing import Any
class DatasetPreprocessor():
"""数据集前处理工具。
"""
@staticmethod
def convert_to_datetime(df: pd.DataFrame,
date_col: str,
date_fmt: str,
is_sort:... | PypiClean |
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/calendar/migrations/0002_auto__add_field_event_url.py | import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Event.url'
db.add_column(u'calendar_event', 'url',
self.gf('django.db.models.fields.URLField')... | PypiClean |
/DMT_core-2.0.0-py3-none-any.whl/DMT/core/plot_2yaxis.py | import os
import numpy as np
from pathlib import Path
from DMT.external import build_tex, build_svg, clean_tex_files, build_png, slugify, tex_to_text
try:
import matplotlib
import matplotlib.pyplot as plt
import matplotlib._pylab_helpers
# rc params spec
packages = [
"\\usepackage{amsmath}... | PypiClean |
/Faker-19.3.1.tar.gz/Faker-19.3.1/faker/providers/person/he_IL/__init__.py | from collections import OrderedDict
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats_female = OrderedDict(
(
("{{first_name_female}} {{last_name}}", 0.9),
("{{first_name_female}} {{last_name}}-{{last_name}}", 0.06),
("{{first_name_femal... | PypiClean |
/CheckMates-0.2.0-py3-none-any.whl/checkmates/data_checks/datacheck_meta/data_check_message_code.py | from enum import Enum
class DataCheckMessageCode(Enum):
"""Enum for data check message code."""
COLS_WITH_NULL = "cols_with_null"
"""Message code for columns with null values."""
HIGHLY_NULL_COLS = "highly_null_cols"
"""Message code for highly null columns."""
HIGHLY_NULL_ROWS = "highly_nul... | PypiClean |
/awesome-mixins-0.18.tar.gz/awesome-mixins-0.18/awesome_mixins/static/awesome_mixins/js/twbs-pagination/jquery.twbsPagination.js | (function ($, window, document, undefined) {
'use strict';
var old = $.fn.twbsPagination;
// PROTOTYPE AND CONSTRUCTOR
var TwbsPagination = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, $.fn.twbsPagination.defaults, options);
if (this.... | PypiClean |
/Firefly_III_API_Client-2.0.5.0-py3-none-any.whl/firefly_iii_client/paths/v1_insight_expense_total/get.py | from dataclasses import dataclass
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict
from firefly_iii_client import api_client, exceptions
from datetime import date, datetime # noqa: F401
import decimal # noqa: F401
import functools # noqa: F401
import io # noqa: F401
import re... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/db/models/sql/where.py | import operator
from functools import reduce
from django.core.exceptions import EmptyResultSet, FullResultSet
from django.db.models.expressions import Case, When
from django.db.models.lookups import Exact
from django.utils import tree
from django.utils.functional import cached_property
# Connection types
AND = "AND"
... | PypiClean |
/FairMongo-5.2.0.tar.gz/FairMongo-5.2.0/FCM/Jarticle/__init__.py | from bson import ObjectId
from FCM.FQ import O, A, Q
from F import DATE
class F:
THIS = lambda field: f"this.{field}"
ID = "_id"
DATE = "date"
COUNT = "count"
AUTHOR = "author"
TITLE = "title"
BODY = "body"
DESCRIPTION = "description"
COMMENTS = "comments"
SOURCE = "source"
... | PypiClean |
/NlpToolkit-Classification-1.0.16.tar.gz/NlpToolkit-Classification-1.0.16/Classification/Parameter/LinearPerceptronParameter.py | from Classification.Parameter.Parameter import Parameter
class LinearPerceptronParameter(Parameter):
learning_rate: float
eta_decrease: float
cross_validation_ratio: float
__epoch: int
def __init__(self,
seed: int,
learningRate: float,
etaDecrea... | PypiClean |
/FlaskCurrency-1.0.tar.gz/FlaskCurrency-1.0/README.md | # Flask-Currency
Currency handling extension for Flask.
## Usage
###Initialization
Initialize extension by providing Flask and Flask-SQLAlchemy instance.
```python
from flask import Flask
from flask_currency import Currency
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy(app)
currency ... | PypiClean |
/DragonPyEmulator-0.9.0-py3-none-any.whl/dragonpy/sbc09/periphery.py | import logging
import queue
import sys
from dragonpy.components.periphery import ConsolePeripheryBase
log = logging.getLogger(__name__)
try:
import tkinter
except ImportError:
log.critical("Error importing Tkinter!")
tkinter = None
class SBC09Periphery:
TITLE = "DragonPy - Buggy machine language ... | PypiClean |
/lektor-3.4.0b6-py3-none-any.whl/lektor/publisher.py | from __future__ import annotations
import errno
import hashlib
import io
import os
import posixpath
import urllib.parse
from contextlib import contextmanager
from contextlib import ExitStack
from contextlib import suppress
from ftplib import Error as FTPError
from inspect import cleandoc
from pathlib import Path
from ... | PypiClean |
/Lantz-0.3.zip/Lantz-0.3/lantz/drivers/legacy/ni/daqmx/channels.py | from .base import Channel, Task
from .constants import Constants
class VoltageInputChannel(Channel):
"""Creates channel(s) to measure voltage and adds the channel(s)
to the task you specify with taskHandle.
If your measurement requires the use of internal excitation or you need
the voltage to be scal... | PypiClean |
/Bempp-cl-0.3.1.tar.gz/Bempp-cl-0.3.1/bempp/api/assembly/potential_operator.py | class PotentialOperator(object):
"""Provides an interface to potential operators.
This class is not supposed to be instantiated directly.
"""
def __init__(self, potential_evaluator):
"""Construct. Should not be called by the user."""
self._evaluator = potential_evaluator
def evalu... | PypiClean |
/IOT3ApiClient-1.0.0.tar.gz/IOT3ApiClient-1.0.0/requests/adapters.py | import os.path
import socket
from urllib3.poolmanager import PoolManager, proxy_from_url
from urllib3.response import HTTPResponse
from urllib3.util import parse_url
from urllib3.util import Timeout as TimeoutSauce
from urllib3.util.retry import Retry
from urllib3.exceptions import ClosedPoolError
from urllib3.excepti... | PypiClean |
/IPRA_SESG-3.20.51-py3-none-any.whl/ipra/Model/Robot/sunlifeRobot.py | from os import write
import os
import time
from bs4 import BeautifulSoup
import xlsxwriter
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support import expected_conditions as EC
from selenium.w... | PypiClean |
/EASIER_net-0.0.8-py3-none-any.whl/easier_net/sier_net.py | import logging
import copy
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import TensorDataset
from torch.utils.data import DataLoader
from .network import SierNet
class SierNetEstimator:
"""
This first a single sparse-... | PypiClean |
/NLP-DecisionTreeClassifier-0.0.2.tar.gz/NLP-DecisionTreeClassifier-0.0.2/README.md | # NLP-DecisionTreeClassifier
Sci-kit Learn Decision Tree Classifier for identifying word entities in text
# Installation Instructions!
pip install NLP-DecisionTreeClassifier
To train a model using this Decision Tree Classifier, you need to provide a text file,
that it will be trained on. Example large_text_file.txt
... | PypiClean |
/NSoL-0.1.14.tar.gz/NSoL-0.1.14/README.md | # Numerical Solver Library
The Numerical Solver Library (NSoL) is a Python-based open-source toolkit for research developed within the [GIFT-Surg][giftsurg] project and contains several implementations of denoising and deconvolution algorithms.
The algorithm and software were developed by [Michael Ebner][mebner]
at ... | PypiClean |
/EnergyCapSdk-8.2304.4743.tar.gz/EnergyCapSdk-8.2304.4743/energycap/sdk/models/webhook_response_py3.py |
from msrest.serialization import Model
class WebhookResponse(Model):
"""WebhookResponse.
:param webhook_id: The identifier of the webhook
:type webhook_id: int
:param webhook_name: The name of the webhook
:type webhook_name: str
:param webhook_description: The description of the webhook
... | PypiClean |
/AyiinXd-0.0.8-cp311-cp311-macosx_10_9_universal2.whl/fipper/node_modules/@types/node/ts4.8/wasi.d.ts | declare module 'wasi' {
interface WASIOptions {
/**
* An array of strings that the WebAssembly application will
* see as command line arguments. The first argument is the virtual path to the
* WASI command itself.
*/
args?: string[] | undefined;
/**
... | PypiClean |
/Flask-AppBuilder-red-2.1.13.tar.gz/Flask-AppBuilder-red-2.1.13/flask_appbuilder/cli.py | from io import BytesIO
import os
import shutil
from urllib.request import urlopen
from zipfile import ZipFile
import click
from flask import current_app
from flask.cli import with_appcontext
from . const import (
AUTH_DB, AUTH_LDAP, AUTH_OAUTH, AUTH_OID, AUTH_REMOTE_USER
)
SQLA_REPO_URL = (
"https://github.... | PypiClean |
/FuzzyClassificator-1.3.84-py3-none-any.whl/pybrain/optimization/finitedifference/pgpe.py | __author__ = 'Frank Sehnke, sehnke@in.tum.de, Tom Schaul'
from scipy import ones, random
from pybrain.auxiliary import GradientDescent
from fd import FiniteDifferences
class PGPE(FiniteDifferences):
""" Policy Gradients with Parameter Exploration (ICANN 2008)."""
#:exploration type
exploration = "l... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.