id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/ImSwitchUC2-2.1.0.tar.gz/ImSwitchUC2-2.1.0/imswitch/imblockly/model/actions.py | import importlib.util
import logging
import os
import time
from typing import Any, Callable
from imswitch.imcommon.framework import Signal, FrameworkUtils
from imswitch.imcommon.model import APIExport, generateAPI, initLogger
class _Actions:
""" Additional functions intended to be made available through the
... | PypiClean |
/CI_LocalConnector-0.18.zip/CI_LocalConnector-0.18/CI_LC_BL.py | import httplib, urllib , json , requests , urllib2, logging , time, datetime ,sys, os , threading , socket, ConfigParser ,random
#import pkg_resources # part of setuptools
import cpppo
from cpppo.server.enip import address, client
TagsDefenitionFileName = 'TagsDefenition.txt'
TagsValuesFileName = '[NEW]TagsValues'
Ta... | PypiClean |
/Bucket-Limiter-0.2.0.tar.gz/Bucket-Limiter-0.2.0/bucket_limiter/__init__.py |
import time
import hashlib
import redis
from redis.exceptions import RedisError
LUA_SCRIPT = '''
local effects = {}
for idx, key in ipairs(KEYS) do
local idxBase = (idx - 1) * 5
local interval = tonumber(ARGV[idxBase + 1])
local capacity = tonumber(ARGV[idxBase + 2])
local nTokens = tonumber(ARGV[idxBase + 3... | PypiClean |
/OASYS1_HALF_SRW-0.0.3-py3-none-any.whl/orangecontrib/srw/widgets/gui/ow_srw_absorber.py | import numpy
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from oasys.widgets import congruence
from syned.beamline.shape import Rectangle, Ellipse
from orangecontrib.srw.widgets.gui.ow_srw_optical_element import OWSRWOpticalElement
class OWSRWAbsor... | PypiClean |
/Dpowers-0.1.5rc1.tar.gz/Dpowers-0.1.5rc1/Dlib/Dhelpers/named.py |
from .baseclasses import KeepInstanceRefs
from .arghandling import check_type
from .decorators import (extend_to_collections)
class NamedObj(KeepInstanceRefs):
defined_objects = None
name_to_stnd_name = None
names_with_important_capital_letters = None
StandardizingDict = None
defined_groups = Non... | PypiClean |
/Django-4.2.4.tar.gz/Django-4.2.4/django/test/html.py | import html
from html.parser import HTMLParser
from django.utils.regex_helper import _lazy_re_compile
# ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020
# SPACE.
# https://infra.spec.whatwg.org/#ascii-whitespace
ASCII_WHITESPACE = _lazy_re_compile(r"[\t\n\f\r ]+")
# https://html.spec.whatwg... | PypiClean |
/FamcyDev-0.3.71-py3-none-any.whl/Famcy/bower_components/bootstrap-fileinput/README.md | <h1 align="center">
<a href="http://plugins.krajee.com" title="Krajee Plugins" target="_blank">
<img src="https://kartik-v.github.io/bootstrap-fileinput-samples/samples/krajee-logo-b.png" alt="Krajee Logo"/>
</a>
<br>
bootstrap-fileinput
<hr>
<a href="https://www.paypal.com/cgi-bin/websc... | PypiClean |
/MLTSA-0.0.7.tar.gz/MLTSA-0.0.7/MLTSA_tensorflow/TF_2_RNN.py | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import SimpleRNN, Dense, Dropout, GRU
class build_MLP():
def __init__(self, n_steps, n_features, n_labels, type="vanilla"):
self.type = type
self.n_labels = n_labels
self.n_features = n_features
self.n_st... | PypiClean |
/Curp-1.3.1.tar.gz/Curp-1.3.1/curp/script/view_ec.py | from pymol import cmd
import sys, os
ONE_LETTER = {
'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q',
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y',
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A',
'GLY':'G', 'PRO':'P', 'CYS':'C',
'HIE':'... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/tools/pretty_plots/plots/plot_with_bootstrapped_uncertainty.py | from typing import Union, Iterable, Tuple, Optional, Callable
import matplotlib.pyplot as plt
import numpy as np
from aerosandbox.tools.statistics import time_series_uncertainty_quantification as tsuq
def plot_with_bootstrapped_uncertainty(
x: np.ndarray,
y: np.ndarray,
ci: Optional[Union[flo... | PypiClean |
/ElectroMagneticPython-2.1.4-py3-none-any.whl/EMpy/transfer_matrix.py | __author__ = "Lorenzo Bolla"
import scipy as S
from scipy.linalg import inv
from EMpy.utils import snell, norm
from EMpy.constants import c, mu0
# import Gnuplot
class TransferMatrix:
"""Class to handle the transfer matrix solvers."""
def __init__(self, multilayer):
"""Set the multilayer.
... | PypiClean |
/AnTeML-0.1.4-py3-none-any.whl/anteml/parser.py | import re
import logging
from typing import Callable, Any, Type, ClassVar, Pattern
from html.parser import HTMLParser
from .entities import entities as default_entities
from .elements import Element, ElementAlias, elements as default_elements
__all__ = ["AntemlParser"]
logger = logging.getLogger(__name__)
class Ant... | PypiClean |
/GSEIMIITB-1.1.tar.gz/GSEIMIITB-1.1/src/grc/core/generator/FlowGraphProxy.py |
from __future__ import absolute_import
class FlowGraphProxy(object): # TODO: move this in a refactored Generator
def __init__(self, fg):
self.orignal_flowgraph = fg
def __getattr__(self, item):
return getattr(self.orignal_flowgraph, item)
def get_pad_sources(self):
"""
... | PypiClean |
/FLPFile-0.2.0.tar.gz/FLPFile-0.2.0/LICENSE.md |
Copyright (c) 2021, julian porter
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following di... | PypiClean |
/MoorPy-1.0.1.tar.gz/MoorPy-1.0.1/moorpy/point.py | import numpy as np
class Point():
'''A class for any object in the mooring system that can be described by three translational coorindates'''
def __init__(self, mooringSys, num, type, r, m=0, v=0, fExt=np.zeros(3), DOFs=[0,1,2], d=0, zSpan=[-1,1], CdA=0.0, Ca=0.0):
'''Initialize Point attributes... | PypiClean |
/FESTIM-0.11.1-py3-none-any.whl/festim/boundary_conditions/dirichlets/dc_imp.py | from festim import DirichletBC, BoundaryConditionExpression, k_B
import fenics as f
import sympy as sp
def dc_imp(T, phi, R_p, D_0, E_D, Kr_0=None, E_Kr=None):
D = D_0 * f.exp(-E_D / k_B / T)
value = phi * R_p / D
if Kr_0 is not None:
Kr = Kr_0 * f.exp(-E_Kr / k_B / T)
value += (phi / Kr) ... | PypiClean |
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/tiny_mce/plugins/bookiimage/js/dialog2.js | var FileBrowserDialogue = {
attachments: null,
win: null,
selectedAttachment: null,
init : function () {
this.win = tinyMCEPopup.getWindowArg("window");
var j = this.win.parent.jQuery;
j("#filesframe", document).ready(function() {
FileBrowserDialogue.loadAttachments();
... | PypiClean |
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dijit/nls/dijit-all_cs.js | dojo.provide("dijit.nls.dijit-all_cs");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.cs");dojo.nls.colors.cs={"lightsteelblue":"světlá ocelová modrá","orangered":"oranžovočervená","midnightblue":"temně modrá","cadetblue":"šedomodrá","seashell":"lasturová","slategrey":"břidlic... | PypiClean |
/HolmesV-2021.10.8.tar.gz/HolmesV-2021.10.8/mycroft/client/speech/hotword_factory.py | """Factory functions for loading hotword engines - both internal and plugins.
"""
from contextlib import suppress
from glob import glob
import os
from os.path import dirname, exists, join, abspath, expanduser, isfile, isdir
import platform
import posixpath
from shutil import rmtree
import struct
import tempfile
from th... | PypiClean |
/CellNet-1.1.1.3-py3-none-any.whl/cellphonedb/src/core/methods/cpdb_statistical_analysis_helper.py | import itertools
from functools import partial
from multiprocessing.pool import Pool
import numpy as np
import pandas as pd
from cellphonedb.src.core.core_logger import core_logger
def get_significant_means(real_mean_analysis: pd.DataFrame, result_percent: pd.DataFrame) -> pd.DataFrame:
"""
If the result_pe... | PypiClean |
/observations-0.1.4.tar.gz/observations-0.1.4/observations/r/german.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 german(path):
"""German credit scoring data
See website for details of data attributes
... | PypiClean |
/EOxServer-1.2.12-py3-none-any.whl/eoxserver/services/ows/wps/v20/execute.py |
from logging import getLogger
from typing import Any
from eoxserver.services.ows.wps.util import get_process_by_identifier
from eoxserver.services.ows.wps.interfaces import ProcessInterface
from eoxserver.services.ows.wps.exceptions import OperationNotSupportedError
from eoxserver.services.ows.wps.parameters import B... | PypiClean |
/EtaML-0.0.9-py3-none-any.whl/etaml/calibration.py | import os
import numpy as np
import pandas as pd
from sklearn.calibration import CalibratedClassifierCV
from sklearn.metrics import brier_score_loss
from sklearn.calibration import calibration_curve
import plotly.graph_objects as go
def create_calibration_curve(original_model, calibrated_model, features, labels, clf_... | PypiClean |
/Nuitka_fixed-1.1.2-cp310-cp310-win_amd64.whl/nuitka/code_generation/templates/CodeTemplatesLoader.py | template_metapath_loader_compiled_module_entry = """\
{%(module_name)s, modulecode_%(module_identifier)s, 0, 0, %(flags)s
#if defined(_NUITKA_FREEZER_HAS_FILE_PATH)
, %(file_path)s
#endif
},"""
template_metapath_loader_extension_module_entry = """\
{%(module_name)s, NULL, 0, 0, %(flags)s
#if defined(_NUITKA_FREEZER_HA... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/localflavor/us/us_states.py | CONTIGUOUS_STATES = (
('AL', 'Alabama'),
('AZ', 'Arizona'),
('AR', 'Arkansas'),
('CA', 'California'),
('CO', 'Colorado'),
('CT', 'Connecticut'),
('DE', 'Delaware'),
('DC', 'District of Columbia'),
('FL', 'Florida'),
('GA', 'Georgia'),
('ID', 'Idaho'),
('IL', 'Illinois'),
... | PypiClean |
/Electrum-VTC-2.9.3.3.tar.gz/Electrum-VTC-2.9.3.3/gui/kivy/uix/drawer.py | from kivy.app import App
from kivy.factory import Factory
from kivy.properties import OptionProperty, NumericProperty, ObjectProperty
from kivy.clock import Clock
from kivy.lang import Builder
import gc
# delayed imports
app = None
class Drawer(Factory.RelativeLayout):
'''Drawer Widget to hold the main window a... | PypiClean |
/2ppy-0.4.0-py3-none-any.whl/tuprolog/solve/exception/error/permission/__init__.py | from typing import Union
# noinspection PyUnresolvedReferences
import jpype.imports
from tuprolog import logger
from tuprolog.core import Term
from tuprolog.solve import ExecutionContext, Signature
# noinspection PyUnresolvedReferences
import it.unibo.tuprolog.solve.exception.error as errors
PermissionError = errors.... | PypiClean |
/AutoDiff_jnrw-0.0.2-py3-none-any.whl/autodiff/vector/function.py | import numpy as np
from ..forward.sym import Symbol
from .sym import SymVec, symbolic_vec
from ..forward import function as fw_f
# trigonometric functions
@symbolic_vec
def sin(a: Symbol) -> Symbol:
"""
Sine operation on SymVec object
:param a: input Symbol
:type a: Symbol
:return: Symbol after Sin... | PypiClean |
/DpmModule-1.1.0-py3-none-any.whl/dpmModule/jobs/archmageFb.py | from ..kernel import core
from ..kernel.core import VSkillModifier as V
from ..character import characterKernel as ck
from ..status.ability import Ability_tool
from ..execution.rules import RuleSet, SynchronizeRule
from . import globalSkill
from .jobclass import adventurer
from .jobbranch import magicians
#TODO : 도트데미지... | PypiClean |
/Exegol-4.2.5.tar.gz/Exegol-4.2.5/exegol-docker-build/sources/install/package_c2.sh |
source common.sh
function install_pwncat() {
colorecho "Installing pwncat"
python3 -m pipx install pwncat-cs
add-history pwncat
add-test-command "pwncat-cs --version"
add-to-list "pwncat,https://github.com/calebstewart/pwncat,A lightweight and versatile netcat alternative that includes various add... | PypiClean |
/MetaCalls-0.0.5-cp310-cp310-manylinux2014_x86_64.whl/metacalls/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts |
interface Atomics {
/**
* Adds a value to the value at the given position in the array, returning the original value.
* Until this atomic operation completes, any other read or write operation against the array
* will block.
*/
add(typedArray: BigInt64Array | BigUint64Array, index: number,... | PypiClean |
/Flask-Security-Classic-3.0.2.tar.gz/Flask-Security-Classic-3.0.2/flask_security/confirmable.py | from flask import current_app as app
from werkzeug.local import LocalProxy
from .signals import confirm_instructions_sent, user_confirmed
from .utils import config_value, get_token_status, hash_data, \
url_for_security, verify_hash
# Convenient references
_security = LocalProxy(lambda: app.extensions['security'])... | PypiClean |
/ChadBot3-0.1-py3-none-any.whl/ChadBot/generation/rajat_work/qgen/generator/fpm/matcher.py | import re
from collections import defaultdict
from itertools import product
import regex
from ...util import nlp
from .pattern import TOKENS as SPECIAL_TOKENS
_spacy_docs_cache = dict()
class MatchedResult:
def __init__(self, group_id, pattern, match):
self.group_id = group_id
self.pattern = p... | PypiClean |
/NovalIDE-1.1.8-py3-none-any.whl/noval/ttkwidgets/checkboxtreeview.py | import tkinter as tk
try:
import ttk
except ImportError:
from tkinter import ttk
import os
import noval.imageutils as imageutils
class CheckboxTreeview(ttk.Treeview):
"""
:class:`ttk.Treeview` widget with checkboxes left of each item.
.. note::
The checkboxes are done via the image at... | PypiClean |
/MPT5.0.1-0.1.tar.gz/MPT5.0.1-0.1/src/MPT5/AI/Analiz.py |
from wx.py import frame,filling,pseudo
import re
class Anlzfil(object):
def __init__(self, pyFile):
self.pyFile = pyFile
self.imprts = []
self.objcts = {}
self.pmodls = {}
def parsefil(self):
with open(self.pyFile, 'r', encoding=u'utf-8') as fpy:
linsred = ... | PypiClean |
/My_messenger_server_app_homework-0.0.1.tar.gz/My_messenger_server_app_homework-0.0.1/server/server/core.py | import threading
import logging
import select
import socket
import json
import hmac
import binascii
import os
import sys
sys.path.append('../')
from common.metaclasses import ServerMaker
from common.descryptors import Port
from common.variables import *
from common.utils import send_message, get_message
from common.dec... | PypiClean |
/Bibtex_Difference_Checker-2.1.tar.gz/Bibtex_Difference_Checker-2.1/bibtex_diff_checker/model.py | import bibtexparser
import Tkinter as tk
from Tkinter import *
from ttk import *
import Tkinter, Tkconstants, tkFileDialog
from unqlite import UnQLite
class Model():
"""Creates and maintains UnQLite and Bibtex databases"""
def __init__(self,master,local):
"""define UnQLite database"""
... | PypiClean |
/Charisma_toolbox-0.0.2-py3-none-any.whl/orangecontrib/extension/utils/widget.py | from xml.sax.saxutils import escape
import numpy as np
from AnyQt.QtCore import QSize, Signal, Qt
from AnyQt.QtWidgets import QApplication
from orangewidget.utils.visual_settings_dlg import VisualSettingsDialog
from Orange.data import (
Table, ContinuousVariable, Domain, Variable, StringVariable
)
from Orange.d... | PypiClean |
/FitBenchmarking-1.0.0.tar.gz/FitBenchmarking-1.0.0/fitbenchmarking/utils/log.py | import logging
import sys
def setup_logger(log_file='./fitbenchmarking.log', name='fitbenchmarking',
append=False, level='INFO'):
"""
Define the location and style of the log file.
:param log_file: path to the log file, defaults to './fitbenchmarking.log'
:type log_file: str, optiona... | PypiClean |
/BeamDelta-1.2.0.tar.gz/BeamDelta-1.2.0/README.md | # BeamDelta: Alignment tool
A simple GUI interface for python-microscope which allows a compatible
camera (see python-microscope compatibility list) to be used for
optical alignment purposes. The GUI will display live images,
calculate and mark beam centroids and then store an alignment centroid
position. Once a posi... | PypiClean |
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/misc/utils/embedder_utils.py | import logging
import hashlib
import pickle
from os import environ
from os.path import join, isfile
from typing import Optional, Dict
from Orange.canvas.config import cache_dir
log = logging.getLogger(__name__)
class EmbeddingCancelledException(Exception):
"""
Thrown when the embedding task is cancelled fr... | PypiClean |
/OASYS1-shadow4-0.0.10.tar.gz/OASYS1-shadow4-0.0.10/orangecontrib/shadow4/widgets/optics/ow_refractive_interface.py | from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasysgui
from shadow4.beamline.optical_elements.refractors.s4_conic_interface import S4ConicInterface, S4ConicInterfaceElement
from orangecontrib.shadow4.widgets.gui.ow_optical_element_with_surface_shape import OW... | PypiClean |
/1and1-1.8.0.tar.gz/1and1-1.8.0/oneandone/client.py | import time
import logging
import httplib as http_client
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
from requests.packages.urllib3.util.retry import Retry
import ssl
import base64
try:
from cStringIO import StringIO
except BaseException:
... | PypiClean |
/GitPython-3.1.34-py3-none-any.whl/git/objects/tag.py | """ Module containing all object based types. """
from . import base
from .util import get_object_type_by_name, parse_actor_and_date
from ..util import hex_to_bin
from ..compat import defenc
from typing import List, TYPE_CHECKING, Union
from git.types import Literal
if TYPE_CHECKING:
from git.repo import Repo
... | PypiClean |
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/data/transforms/transforms.py | import random
import torch
import torchvision
from torchvision.transforms import functional as F
class Compose(object):
def __init__(self, transforms):
self.transforms = transforms
def __call__(self, image, target):
for t in self.transforms:
image, target = t(image, target)
... | PypiClean |
/Flask-AppBuilder-red-2.1.13.tar.gz/Flask-AppBuilder-red-2.1.13/flask_appbuilder/models/filters.py | import copy
import logging
from .._compat import as_unicode
log = logging.getLogger(__name__)
map_args_filter = {}
""" private map for arg_name and child Filter classes """
class BaseFilter(object):
"""
Base class for all data filters.
Sub class to implement your own custom filters
"""
... | PypiClean |
/FuckItPy-0.0.2.tar.gz/FuckItPy-0.0.2/src/fuckitpy/fuckitpy.py | from __future__ import print_function
import time
import multiprocessing as mp
import sys
import os
class Process(mp.Process):
def __init__(self, *args, **kwargs):
mp.Process.__init__(self, *args, **kwargs)
self._pconn, self._cconn = mp.Pipe()
self._exception = None
def run(self):
... | PypiClean |
/Freddie-0.9.8-py3-none-any.whl/freddie/helpers.py | import logging
from inspect import (
Parameter,
Signature,
isasyncgenfunction,
iscoroutinefunction,
signature as get_signature,
)
from itertools import chain
from operator import attrgetter
from typing import (
Any,
AsyncIterable,
Awaitable,
Callable,
Iterable,
Iterator,
... | PypiClean |
/BobBuildTool-0.23.1.tar.gz/BobBuildTool-0.23.1/doc/releases/0.19.rst | Bob 0.19 Release Notes
======================
Changes made since Bob 0.18.0 include the following.
New commands
------------
bob archive find - Find artifacts matching a retention expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The find command can be used to verify that a retention exp... | PypiClean |
/Khayyam-3.0.17-cp27-cp27m-macosx_10_11_x86_64.whl/khayyam/formatting/constants.py | from __future__ import unicode_literals
PERSIAN_DIGIT_MAPPING = [
(('\u06f0', '\u0660'), '0'),
(('\u06f1', '\u0661'), '1'),
(('\u06f2', '\u0662'), '2'),
(('\u06f3', '\u0663'), '3'),
(('\u06f4', '\u0664'), '4'),
(('\u06f5', '\u0665'), '5'),
(('\u06f6', '\u0666'), '6'),
(('\u06f7', '\u066... | PypiClean |
/Electrum-Zcash-Random-Fork-3.1.3b5.tar.gz/Electrum-Zcash-Random-Fork-3.1.3b5/lib/commands.py |
import sys
import datetime
import copy
import argparse
import json
import ast
import base64
from functools import wraps
from decimal import Decimal
from .import util
from .util import bfh, bh2u, format_satoshis, json_decode, print_error, json_encode
from .import bitcoin
from .bitcoin import is_address, hash_160, COI... | PypiClean |
/edward-1.3.5.tar.gz/edward-1.3.5/edward/inferences/klpq.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import six
import tensorflow as tf
from edward.inferences.variational_inference import VariationalInference
from edward.models import RandomVariable
from edward.util import copy, get_descendants
try:
from e... | PypiClean |
/GuangTestBeat-0.13.1-cp38-cp38-macosx_10_9_x86_64.whl/econml/orf/_ortho_forest.py | import abc
import inspect
import numpy as np
import warnings
from joblib import Parallel, delayed
from sklearn import clone
from scipy.stats import norm
from sklearn.exceptions import NotFittedError
from sklearn.linear_model import LassoCV, Lasso, LinearRegression, LogisticRegression, \
LogisticRegressionCV, Elasti... | PypiClean |
/FoilMesh-0.0.8.tar.gz/FoilMesh-0.0.8/foilmesh/meshio/avsucd/_avsucd.py | import numpy as np
from ..__about__ import __version__ as version
from .._common import _pick_first_int_data, warn
from .._files import open_file
from .._helpers import register_format
from .._mesh import CellBlock, Mesh
meshio_to_avsucd_type = {
"vertex": "pt",
"line": "line",
"triangle": "tri",
"qua... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/lexer/rewriters.py | from collections import deque
from lepl.core.rewriters import Rewriter
from lepl.lexer.lexer import Lexer
from lepl.lexer.support import LexerError
from lepl.lexer.matchers import BaseToken, NonToken
from lepl.matchers.matcher import Matcher, is_child
from lepl.regexp.unicode import UnicodeAlphabet
from lepl.support.l... | PypiClean |
/MeUtils-2023.8.29.13.9.44-py3-none-any.whl/meutils/fileparser/filetype/types/audio.py |
from __future__ import absolute_import
from .base import Type
class Midi(Type):
"""
Implements the Midi audio type matcher.
"""
MIME = 'audio/midi'
EXTENSION = 'midi'
def __init__(self):
super(Midi, self).__init__(
mime=Midi.MIME,
extension=Midi.EXTENSION
... | PypiClean |
/MindustryCompiler-2.1-py3-none-any.whl/compiler/yacc/generateYacc.py | from compiler import CompilationException
from typing import Callable
from pathlib import PurePath
import os
class Context:
p_fun = {}
p_imports = {}
precedence = None
context = Context()
# a decorator to get grammar function (ak: p_fun)
# use it to declare a p_function
def grammar(p_fun: Callable):
... | PypiClean |
/AADeepLearning-1.0.8.tar.gz/AAdeepLearning-1.0.8/develop/aa_dnn_mnist_svm.py | from aa_deep_learning.AADeepLearning import AADeepLearning
from aa_deep_learning.AADeepLearning.datasets import mnist
from aa_deep_learning.AADeepLearning.datasets import np_utils
import numpy as np
np.random.seed(0)
# mnist数据集已经被划分成了60,000个训练集,10,000个测试集的形式,如果数据不存在则自动下载
(x_train, y_train), (x_test, y_test) = mnist.lo... | PypiClean |
/Firefly%20III%20API%20Python%20Client-1.5.6.post2.tar.gz/Firefly III API Python Client-1.5.6.post2/firefly_iii_client/model/configuration_update.py | import re # noqa: F401
import sys # noqa: F401
from firefly_iii_client.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,... | PypiClean |
/ChemDataExtractor-1.3.0-py3-none-any.whl/chemdataextractor/scrape/base.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from abc import ABCMeta, abstractproperty, abstractmethod
import logging
import requests
import six
log = logging.getLogger(__name__)
class BaseScraper(six.with_metacl... | PypiClean |
/Graphillion-1.5.tar.gz/Graphillion-1.5/graphillion/setset.py | from builtins import range
from future.utils import viewitems
import _graphillion
class setset(_graphillion.setset):
"""Represents and manipulates a set of sets.
A setset object stores a set of sets. A set element can be any
hashable object like a number, a text string, and a tuple.
Like Python set... | PypiClean |
/AList-2.0.0-py3-none-any.whl/alist/pages/anime.py | from tkinter import ttk, RIGHT, BOTH, LEFT
from alist.pages.right_page import RightPage
from alist.utils import utils
class Anime(RightPage):
def __init__(self, main, mal_id):
super(Anime, self).__init__(main)
self.mal_id = mal_id
self.anime = self.main.mal.anime(mal_id)
title = ... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_lu-cd.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-puppet.min.js | !function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \... | PypiClean |
/Kr0nOs-3.4.1.tar.gz/Kr0nOs-3.4.1/kronbot/core/commands/commands.py | from __future__ import annotations
import functools
import inspect
import re
import weakref
from typing import (
TYPE_CHECKING,
Awaitable,
Callable,
Dict,
List,
MutableMapping,
Optional,
Tuple,
Union,
)
import discord
from discord.ext.commands import BadArgument, CheckFailure
from ... | PypiClean |
/mrv-1.0.2-stable.zip/mrv-1.0.2-stable/mrv/ext/networkx/networkx/classes/function.py | __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult(dschult@colgate.edu)"""
# Copyright (C) 2004-2008 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# functional st... | PypiClean |
/Bis-Miner-3.11.1.tar.gz/Bis-Miner-3.11.0/Orange/projection/pca.py | import numpy as np
import sklearn.decomposition as skl_decomposition
try:
from orangecontrib.remote import aborted, save_state
except ImportError:
def aborted():
return False
def save_state(_):
pass
import Orange.data
from Orange.data.util import SharedComputeValue
from Orange.data import... | PypiClean |
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/RevitAnnotation.py |
import clr
import System
# import common library modules
import RevitCommonAPI as com
import Result as res
import Utility as util
import RevitFamilyUtils as rFam
# import Autodesk
import Autodesk.Revit.DB as rdb
import Autodesk.Revit.DB.Architecture as rdbA
clr.ImportExtensions(System.Linq)
# --------------------... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Common/Utils/Serialization/JSONSerializator.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/DARE-0.8.0175.tar.gz/DARE-0.8.0175/dare/helpers/prepareworkflow.py | __author__ = "Sharath Maddineni"
__copyright_ = "Copyright 2011-2012, Sharath Maddineni"
__license__ = "MIT"
import uuid
import sys
from .misc import darelogger
from .stepunit import StepUnit, StepUnitStates
from .cfgparser import CfgParser
class PrepareWorkFlow(object):
"""DARE prepare WF:
- reads diffe... | PypiClean |
/Flask-CKEditor-0.4.6.tar.gz/Flask-CKEditor-0.4.6/flask_ckeditor/static/basic/lang/eu.js | /*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['eu']={"editor":"Testu aberastuaren editorea","editorPanel":"Testu aberastuaren editorearen panela","common":{"editorHelp":"Sakatu ALT 0 laguntza jasotzeko","bro... | PypiClean |
/Caboodle-1.0.2.tar.gz/Caboodle-1.0.2/caboodle/solve.py | from caboodle.agents.spec import Agent
from caboodle.challenges.spec import Challenge
from caboodle.web import Browser
from time import time
class Solver(object):
'''
Solves challenges in a Browser
Args:
browser (Browser): The web browser to use
Raises:
TypeError: The browser is not of type Browser
'''
de... | PypiClean |
/Django-Bootstrap3-Validator-0.3.3.zip/Django-Bootstrap3-Validator-0.3.3/bootstrap_validator/static/validator/js/language/tr_TR.js | (function($) {
/**
* Turkish language package
* Translated By @CeRBeR666
*/
$.fn.bootstrapValidator.i18n = $.extend(true, $.fn.bootstrapValidator.i18n, {
base64: {
'default': 'Lütfen 64 bit tabanına uygun bir giriş yapınız'
},
between: {
'default': ... | PypiClean |
/Gewebehaken-0.3-py3-none-any.whl/gewebehaken/hooks/gitlab.py | from enum import Enum
from blinker import signal
from flask import abort, Blueprint, request
from ..util import (
get_or_400,
log_incoming_request_data,
respond_no_content,
)
gitlab_commit_note = signal('gitlab-commit-note')
gitlab_issue = signal('gitlab-issue')
gitlab_issue_note ... | PypiClean |
/Nikola-8.2.4-py3-none-any.whl/Nikola-8.2.4.data/data/share/doc/nikola/extending.rst | .. title: Extending Nikola
.. slug: extending
.. date: 2012-03-30 23:00:00 UTC-03:00
.. tags:
.. link:
.. description:
.. author: The Nikola Team
:Version: 8.2.4
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>
.. class:: alert alert-primary float-md-right
.. contents::
.. class:: lead
Nikola is extensible. A... | PypiClean |
/IQA_Metrics_Toolbox-2023.0.8-py3-none-any.whl/IQA_Metrics_Toolbox/brisque.py | import cv2
import collections
from itertools import chain
import urllib.request as request
import pickle
import numpy as np
import scipy.signal as signal
import scipy.ndimage.filters as filters
import scipy.special as special
import scipy.optimize as optimize
import skimage.io
from libsvm import svmutil
import os
from ... | PypiClean |
/Auptimizer-2.0.tar.gz/Auptimizer-2.0/src/aup/compression/torch/compressor.py |
import types
import logging
import torch
from . import default_layers
_logger = logging.getLogger(__name__)
class LayerInfo:
def __init__(self, name, module):
self.module = module
self.name = name
self.type = type(module).__name__
def _setattr(model, name, module):
name_list = name.... | PypiClean |
/BiGG_SABIO-0.0.1.tar.gz/BiGG_SABIO-0.0.1/bigg_sabio/scraper.py | from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support.ui import Select
from selenium import webdriver
from scipy.constants import minute, hour, milli, nano, micro
from pprint import pprint
from chardet import detect
from glob import glob
from math import floor
import datetime
import pa... | PypiClean |
/FlaskBB-2.0.2.tar.gz/FlaskBB-2.0.2/flaskbb/core/auth/authentication.py | from abc import abstractmethod
from ..._compat import ABC
from ..exceptions import BaseFlaskBBError
class StopAuthentication(BaseFlaskBBError):
"""
Used by Authentication providers to halt any further
attempts to authenticate a user.
:param reason str: The reason why authentication was halted
""... | PypiClean |
/Coquille-1.2.0.tar.gz/Coquille-1.2.0/src/coquille/sequences.py | from typing import Literal
# Constants
CHAR_ESC = "\u001b"
CURSOR_VISIBILITY = 25
FOCUS_REPORT = 1004
ALT_SCREEN_BUFFER = 1049
BRACKETED_PASTE_MODE = 2004
FOREGROUND_CODE = 30
BACKGROUND_CODE = 40
UNDERLINE_CODE = 50
RESET = 9
# Helper types
EscapeSequenceName = str
AltFontNumber = Literal[1, 2, 3, 4, 5, 6, 7, 8... | PypiClean |
/dyson-1.1.2.tar.gz/dyson-1.1.2/lib/dyson/vars/parsing.py | import jinja2
from six import string_types
from dyson.utils import selectors
def find_all_in(string, whole_string):
start = 0
while True:
start = whole_string.find(string, start)
if start == -1:
return
yield start
start += len(string)
def parse_keyvalue(arg):
... | PypiClean |
/Annalist-0.5.18.tar.gz/Annalist-0.5.18/annalist_root/annalist/models/entityfinder.py | from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
"""
This module contains (and isolates) logic used to find entities based on entity type,
list selection criteria and search terms.
"""
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 20... | PypiClean |
/Loglan-DB-0.1.21.tar.gz/Loglan-DB-0.1.21/loglan_db/model_db/addons/addon_word_linker.py | from typing import List
from flask_sqlalchemy import BaseQuery
from loglan_db.model_db.base_author import BaseAuthor
from loglan_db.model_db.base_connect_tables import t_connect_words
from loglan_db.model_db.base_word import BaseWord
class AddonWordLinker:
"""AddonWordLinker Model"""
_derivatives: BaseQuery... | PypiClean |
/Flask-Statics-Helper-1.0.0.tar.gz/Flask-Statics-Helper-1.0.0/flask_statics/static/angular/i18n/angular-locale_mua-cm.js | 'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... | PypiClean |
/Kallithea-0.7.0.tar.gz/Kallithea-0.7.0/kallithea/bin/kallithea_gist.py | import argparse
import fileinput
import json
import os
import stat
import sys
from kallithea.bin.base import FORMAT_JSON, FORMAT_PRETTY, RcConf, api_call
def argparser(argv):
usage = (
"kallithea-gist [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
"[--config=CONFIG] [--save-config] [G... | PypiClean |
/ANSI-Color-1.0.2.tar.gz/ANSI-Color-1.0.2/ansicolor/termcolor.py |
from __future__ import print_function
import os
__author__ = 'naitiz'
class Fore:
BLACK = 30
RED = 31
GREEN = 32
YELLOW = 33
BLUE = 34
MAGENTA = 35
CYAN = 36
WHITE = 37
RESET = 39
# These are fairly well supported, but not part of the standard.
LIGHTBLACK_EX = 90
L... | PypiClean |
/KalturaApiClient-19.3.0.tar.gz/KalturaApiClient-19.3.0/KalturaClient/Plugins/Rating.py | from __future__ import absolute_import
from .Core import *
from ..Base import (
getXmlNodeBool,
getXmlNodeFloat,
getXmlNodeInt,
getXmlNodeText,
KalturaClientPlugin,
KalturaEnumsFactory,
KalturaObjectBase,
KalturaObjectFactory,
KalturaParams,
KalturaServiceBase,
)
########## enu... | PypiClean |
/LFake-18.9.0.tar.gz/LFake-18.9.0/lfake/providers/ssn/nl_BE/__init__.py | from .. import Provider as SsnProvider
"""
For more info on rijksregisternummer, see https://nl.wikipedia.org/wiki/Rijksregisternummer
Dutch/French only for now ...
"""
class Provider(SsnProvider):
def ssn(self) -> str:
"""
Returns a 11 digits Belgian SSN called "rijksregisternummer" as a string
... | PypiClean |
/LibJciHitachi-0.5.2-py3-none-any.whl/JciHitachi/utility.py | import hashlib
import math
def bin_concat(int_1, int_2, int_1_byte=None, int_2_byte=None): # pragma: no cover
"""Concatenate two integer.
Steps:
1. Zero fill integers according to the given byte.
2. Concatenate two integers in binary.
Parameters
----------
int_1 : int
Lef... | PypiClean |
/Flask-SuperAdmin-1.7.1.tar.gz/Flask-SuperAdmin-1.7.1/README.rst | Flask-SuperAdmin
================
.. image:: https://travis-ci.org/SyrusAkbary/Flask-SuperAdmin.png?branch=master
:target: https://travis-ci.org/SyrusAkbary/Flask-SuperAdmin
Flask-Superadmin is the **best** admin interface framework for `Flask <http://flask.pocoo.org/>`_. As good as Django admin.
Batteries ... | PypiClean |
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/layers/transformer_layer.py |
import oneflow.nn as nn
from libai.utils import distributed as dist
from .attention import MultiheadAttention
from .droppath import DropPath
from .layer_norm import LayerNorm
from .mlp import MLP
class TransformerLayer(nn.Module):
"""A single transformer layer.
Transformer layer takes input with size [bsz... | PypiClean |
/ClangFunctionDifferenceBear-0.10.0.tar.gz/ClangFunctionDifferenceBear-0.10.0/coalaClangFunctionDifferenceBear/ClangFunctionDifferenceBear.py | import functools
from itertools import combinations
from bears.c_languages.ClangBear import clang_available, ClangBear
from bears.c_languages.codeclone_detection.ClangCountingConditions import (
condition_dict)
from bears.c_languages.codeclone_detection.ClangCountVectorCreator import (
ClangCountVectorCreator)... | PypiClean |
/Grammaticomastix-0.0.1rc2-py3-none-any.whl/grammaticomastix/dchars/languages/bod/transliterations/ewts/ewts.py | import re
from copy import deepcopy
from dchars.utilities.regexstring import regexstring_list
from dchars.utilities.lstringtools import isort_a_lstrings_bylen_nodup
from dchars.utilities.lstringtools import prepare_list_to_strformat
from dchars.errors.errors import DCharsError
from dchars.utilities.orderedset import O... | PypiClean |
/Jug-2.3.0.tar.gz/Jug-2.3.0/jug/backends/base.py | from abc import ABCMeta, abstractmethod
class base_store(metaclass=ABCMeta):
def __init__(self, name):
'''
base_store(name)
Initialise a backend
Parameters
----------
name : str
Internal name to use
'''
@abstractmethod
def dump(self, ob... | PypiClean |
/BayesASE-21.1.13.1.tar.gz/BayesASE-21.1.13.1/scripts/check_sam_present.py | """Verify that the sam files selected as tool arguments exist on the filesystem."""
import argparse
import os
from pathlib import Path
def get_args():
parser = argparse.ArgumentParser(
description="Check number of reads per FQ file into and out of sam compare"
)
parser.add_argument(
"-fq"... | PypiClean |
/DeepCell-0.12.9.tar.gz/DeepCell-0.12.9/deepcell/utils/transform_utils.py | import numpy as np
from scipy import ndimage
from skimage.measure import label
from skimage.measure import regionprops
from skimage.morphology import ball, disk
from skimage.morphology import binary_dilation
from skimage.segmentation import find_boundaries
from tensorflow.keras import backend as K
from deepcell_toolbo... | PypiClean |
/NSFWDetection-1.0.2.tar.gz/NSFWDetection-1.0.2/README.md | # NSFW-Detection-Pytorch
## Description
In this repository you can find an effective CNN model for detecting NSFW content in images. It achieves a 97.70% accuracy on the [pornography-2k](https://recod.ai/code-data/#porno) dataset. Apart from the provided code you need to reproduce the model, you can also use this mode... | PypiClean |
/Oasis_Optimization-1.0.2-py3-none-any.whl/Oasis/ga/nsga2.py | INF = 1.0e14
import time
import numpy as np
import sys
import random #, time
# from Oasis.ga.rand import randomize
from Oasis.ga.tourselect import Selection
from Oasis.ga.mutation import Mutation
from Oasis.ga.merge import merge
from Oasis.ga.fillnds import NonDominatedSort
from Oasis.ga.datastructure import Populatio... | PypiClean |
/HastebinAPI-0.1.3.tar.gz/HastebinAPI-0.1.3/src/Hastebin/Hastebin.py | import sys
import json
import requests
def CreateHaste(content="", **kwargs):
pt = kwargs.get("print", False)
fullurl = kwargs.get("fullurl", True)
if content == "":
raise TypeError("CreateHaste was called but content was not provided.")
sys.exit()
try:
request = requests.post("... | PypiClean |
/E.S.P.-Hadouken-0.2.1.tar.gz/E.S.P.-Hadouken-0.2.1/esp_hadouken/introduction/Introduction.py | from pygame.locals import *
from pygame import Surface, event, image, time, mixer
from esp_hadouken.Input import Input
from esp_hadouken.GameChild import *
from esp_hadouken.Toy import *
from esp_hadouken.Diortem import *
from esp_hadouken.Font import *
from Controls import *
class Introduction(Surface, GameChild):
... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.