id stringlengths 1 265 | text stringlengths 6 5.19M | dataset_id stringclasses 7
values |
|---|---|---|
/FicusFramework-3.1.0.post2.tar.gz/FicusFramework-3.1.0.post2/src/rule_engine/core/SimpleValueProvider.py | from api.exceptions import IllegalArgumentException, ServiceInnerException
from rule_engine import IRuleValueProvider
import re
class SimpleValueProvider(IRuleValueProvider):
def __init__(self, data_type=None) -> None:
self.__data_type = data_type
def get_value(self, value):
if value is None... | PypiClean |
/Hate-Tweet-Map-2.0-2.0.tar.gz/Hate-Tweet-Map-2.0-2.0/hate_tweet_map/tweets_processor/MyTagMe.py | from __future__ import absolute_import, division, print_function, unicode_literals
import dateutil.parser
import json
import logging
import requests
import six
from html.parser import HTMLParser
__all__ = [
'annotate', 'mentions', 'relatedness_wid', 'relatedness_title', 'Annotation',
'AnnotateResponse', 'Men... | PypiClean |
/Flask-Ask-0.9.8.tar.gz/Flask-Ask-0.9.8/flask_ask/core.py | import os
import sys
import yaml
import inspect
from datetime import datetime
from io import StringIO
from functools import wraps, partial
import aniso8601
from werkzeug.contrib.cache import SimpleCache
from werkzeug.local import LocalProxy, LocalStack
from jinja2 import BaseLoader, ChoiceLoader, TemplateNotFound
from... | PypiClean |
/Mathics-1.0.tar.gz/Mathics-1.0/mathics/web/media/js/mathjax/jax/output/SVG/fonts/TeX/AMS/Regular/PUA.js | MathJax.Hub.Insert(MathJax.OutputJax.SVG.FONTDATA.FONTS.MathJax_AMS,{57350:[430,23,222,-20,240,"91 417Q104 430 111 430T131 417V301L171 341Q201 373 207 378T220 384Q227 384 233 377T240 366Q240 357 187 299L131 244V-10Q116 -23 111 -23T91 -10V201L49 157Q20 127 14 121T0 115Q-8 115 -14 121T-20 132Q-20 139 17 178Q29 191 36 199... | PypiClean |
/Kr0nOs_Bot-3.3.11-py3-none-any.whl/redbot/core/utils/mod.py | import asyncio
from datetime import timedelta
from typing import List, Iterable, Union, TYPE_CHECKING, Dict
import discord
if TYPE_CHECKING:
from .. import Config
from ..bot import Red
from ..commands import Context
async def mass_purge(messages: List[discord.Message], channel: discord.TextChannel):
... | PypiClean |
/lektor-3.4.0b6-py3-none-any.whl/lektor/databags.py | import errno
import json
import os
from collections import OrderedDict
from inifile import IniFile
from lektor.context import get_ctx
from lektor.utils import decode_flat_data
from lektor.utils import iter_dotted_path_prefixes
from lektor.utils import merge
from lektor.utils import resolve_dotted_value
def load_dat... | PypiClean |
/NEURON_gpu-8.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/neuron/rxd/geometry3d/voxelize.py | from . import ctng
from . import scalarField
import numpy
from .surfaces import chunkify
_max_chunks = 10000000
def voxelize(
source,
dx=0.25,
xlo=None,
xhi=None,
ylo=None,
yhi=None,
zlo=None,
zhi=None,
n_soma_step=100,
):
"""
Generates a cartesian mesh of the volume of a ... | PypiClean |
/Js2Py-0.74.tar.gz/Js2Py-0.74/js2py/es6/babel.py | __all__ = ['babel']
# Don't look below, you will not understand this Python code :) I don't.
from js2py.pyjs import *
# setting scope
var = Scope( JS_BUILTINS )
set_global_object(var)
# Code follows:
var.registers([])
@Js
def PyJs_anonymous_1_(require, module, exports, this, arguments, var=var):
var = Scope({u't... | PypiClean |
/NlpToolkit-Classification-1.0.16.tar.gz/NlpToolkit-Classification-1.0.16/Classification/Parameter/DeepNetworkParameter.py | from Classification.Parameter.ActivationFunction import ActivationFunction
from Classification.Parameter.LinearPerceptronParameter import LinearPerceptronParameter
class DeepNetworkParameter(LinearPerceptronParameter):
__hidden_layers: list
__activation_function: ActivationFunction
def __init__(self,
... | PypiClean |
/NREL_disco-0.4.2-py3-none-any.whl/disco/sources/gem/gem_model.py | import logging
import os
import shutil
import click
from jade.exceptions import InvalidParameter
from disco.cli.common import handle_existing_dir
from disco.models.snapshot_impact_analysis_model import SnapshotImpactAnalysisModel
from disco.sources.base import BaseOpenDssModel, DEFAULT_SNAPSHOT_IMPACT_ANALYSIS_PARAMS... | PypiClean |
/AstroCabTools-1.5.1.tar.gz/AstroCabTools-1.5.1/astrocabtools/fit_line/src/viewers/canvas_interaction/panZoomResiduals.py | import numpy
import weakref
import matplotlib.pyplot as _plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
__all__ = ["figure_pz"]
class MplInteraction(object):
def __init__(self, figure):
"""Initializer
:param Figure figure: The matplotlib figure to attach the... | PypiClean |
/ImageD11-1.9.9.tar.gz/ImageD11-1.9.9/scripts/index_unknown.py |
from __future__ import print_function
# ImageD11_v1 Software for beamline ID11
# Copyright (C) 2008 Jon Wright
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Licen... | PypiClean |
/Bother-1.1.tar.gz/Bother-1.1/bother_utils/heightmap.py | import logging
import math
import time
import tempfile
import zipfile
from typing import Optional, Set, Tuple, List
import numpy as np
from PIL import Image
import rasterio
from rasterio.warp import calculate_default_transform, reproject, Resampling
from rasterio.io import MemoryFile
from bother_utils.srtm import SR... | PypiClean |
/CNN4IE-0.1.9-py3-none-any.whl/cnn4ie/channel_spatial_attention_cnn/channel_spatial_attention.py | import torch
import torch.nn as nn
class ChannelSpatialAttention(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, max_length, ratio=16):
super(ChannelSpatialAttention, self).__init__()
self.channel_attention = ChannelAttention(in_channels, max_length, ratio)
self.spati... | PypiClean |
/InstallResourceServer-0.0.0-py3-none-any.whl/installresourceserver/installresourceserver.py | import logging
from pathlib import Path
from termcolor import colored
from beetools import beearchiver, beeutils
_PROJ_DESC = __doc__.split("\n")[0]
_PROJ_PATH = Path(__file__)
class InstallResourceServer:
"""Class short description one-liner goes here.
Class multi-liner detail description goes here.
""... | PypiClean |
/Beeswarm-0.7.18.tar.gz/Beeswarm-0.7.18/beeswarm/drones/honeypot/honeypot.py |
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along... | PypiClean |
/FEV_KEGG-1.1.4.tar.gz/FEV_KEGG-1.1.4/FEV_KEGG/Experiments/48.py | from FEV_KEGG.KEGG.File import cache
from FEV_KEGG.Evolution.Clade import Clade
from FEV_KEGG.Statistics import Percent
from FEV_KEGG.Robustness.Topology.Redundancy import RedundancyType, Redundancy, RedundancyContribution
@cache(folder_path='experiments', file_name='deltaproteobacteria_clade')
def getCladeA():
cl... | PypiClean |
/FAdo3-1.0.tar.gz/FAdo3-1.0/FAdo/tfa.py | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import *
from builtins import object
from . import fa
from ab... | PypiClean |
/123_object_detection-0.1.tar.gz/123_object_detection-0.1/slim/nets/cifarnet.py | """Contains a variant of the CIFAR-10 model definition."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v1 as tf
import tf_slim as slim
# pylint: disable=g-long-lambda
trunc_normal = lambda stddev: tf.truncated_normal_initialize... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js | /*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp","pt",{title:"Instruções de Acessibilidade",contents:"Conteúdos da Ajuda. Pressione em 'ESC' para fechar esta janela.",legend:[{name:"Geral... | PypiClean |
/KratosOptimizationApplication-9.4-cp310-cp310-win_amd64.whl/KratosMultiphysics/OptimizationApplication/controls/material/material_control.py |
import KratosMultiphysics as KM
import KratosMultiphysics.OptimizationApplication as KOA
class MaterialControl():
def __init__(self, name, model, settings):
self.name = name
self.type = "material"
self.model = model
self.settings = settings
self.controlling_objects... | PypiClean |
/AutoEPD-0.0.2.tar.gz/AutoEPD-0.0.2/README.md | # AutoEPD
AutoEPD is a package for calculating the Environmental Product Declaration(EPD).
# Result Figures
- some Result examples


# Example
- a simple example c... | PypiClean |
/ConfigConvert-0.2.2.tar.gz/ConfigConvert-0.2.2/configconvert/service.py | import getopt
import sys
import os
import logging
import logging.config
import warnings
from bn import absimport, AttributeDict, uniform_path
from configconvert import existingDirectory, existingFile, parse_config,\
handle_option_error, handle_section_error, split_options
#
# Helpers
#
#def create_config(config_f... | PypiClean |
/CsuPMTD-1.0.27.tar.gz/CsuPMTD-1.0.27/PMTD/maskrcnn_benchmark/modeling/roi_heads/roi_heads.py | import torch
from .box_head.box_head import build_roi_box_head
from .mask_head.mask_head import build_roi_mask_head
from .keypoint_head.keypoint_head import build_roi_keypoint_head
class CombinedROIHeads(torch.nn.ModuleDict):
"""
Combines a set of individual heads (for box prediction or masks) into a single
... | PypiClean |
/GQCMS-0.0.4-py3-none-any.whl/build/lib/gqcms/matrices/Determinant.py | from itertools import combinations, product
import numpy as np
class Determinant:
"""
This class can be used to generate ONVs from a list of occupied orbitals
and generate all n-tuply exited determinants
:param alpha_occ: list of occupied alpha orbitals
:param beta_occ: list of occupied beta orbi... | PypiClean |
/BitGlitter-2.0.0.tar.gz/BitGlitter-2.0.0/bitglitter/read/process_state/framereadhandler.py | from sqlalchemy.exc import InvalidRequestError
import logging
from multiprocessing import cpu_count, Pool
from pathlib import Path
from bitglitter.config.palettemodels import Palette
from bitglitter.config.readmodels.streamread import StreamRead
from bitglitter.read.process_state.videoframegenerator import video_fram... | PypiClean |
/Flask-COMBO-JSONAPI-1.1.0.tar.gz/Flask-COMBO-JSONAPI-1.1.0/flask_combo_jsonapi/resource.py |
import inspect
import simplejson as json
from werkzeug.wrappers import Response
from flask import request, url_for, make_response
from flask.wrappers import Response as FlaskResponse
from flask.views import MethodView, MethodViewType
from marshmallow_jsonapi.exceptions import IncorrectTypeError
from marshmallow impor... | PypiClean |
/MindsDB-23.8.3.0.tar.gz/MindsDB-23.8.3.0/mindsdb/integrations/handlers/hive_handler/hive_handler.py | from typing import Optional
from collections import OrderedDict
import pandas as pd
from pyhive import (hive, sqlalchemy_hive)
from sqlalchemy import create_engine
from mindsdb_sql import parse_sql
from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
from mindsdb_sql.parser.ast.base import ASTNode
from m... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/entry/serial_entry_preference_based_irl.py | import copy
from typing import Union, Optional, List, Any, Tuple
import os
import torch
from ditk import logging
from functools import partial
from tensorboardX import SummaryWriter
from copy import deepcopy
from ding.envs import get_vec_env_setting, create_env_manager
from ding.worker import BaseLearner, InteractionS... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/aerodynamics/aero_3D/test_aero_3D/test_aero_buildup/avl_validation.py | import aerosandbox as asb
import aerosandbox.numpy as np
import pytest
wing_airfoil = asb.Airfoil("naca0010") # asb.Airfoil("sd7037")
tail_airfoil = asb.Airfoil("naca0010")
### Define the 3D geometry you want to analyze/optimize.
# Here, all distances are in meters and all angles are in degrees.
airplane = asb.Airpl... | PypiClean |
/LEPL-5.1.3.zip/LEPL-5.1.3/src/lepl/_example/error.py |
# pylint: disable-msg=W0401,C0111,W0614,W0622,C0301,C0321,C0324,C0103,R0201,R0903
#@PydevCodeAnalysisIgnore
# (the code style is for documentation, not "real")
'''
Examples from the documentation.
'''
from logging import basicConfig, DEBUG
from lepl import *
from lepl._example.support import Example
class NodeErr... | PypiClean |
/Cola-0.1.0b0.tar.gz/Cola-0.1.0b0/cola/core/opener.py | import urllib2
import cookielib
import gzip
import socket
from cola.core.errors import DependencyNotInstalledError
class Opener(object):
def open(self, url):
raise NotImplementedError
def read(self):
raise NotImplementedError
def ungzip(self, fileobj):
gz = gzip.GzipFile(file... | PypiClean |
/CocoPy-1.1.0rc.zip/CocoPy-1.1.0rc/testSuite/TestOpts1_Scanner.py | import sys
class Token( object ):
def __init__( self ):
self.kind = 0 # token kind
self.pos = 0 # token position in the source text (starting at 0)
self.col = 0 # token column (starting at 0)
self.line = 0 # token line (starting at 1)
self.val = u'' # tok... | PypiClean |
/AtomicP2P-0.0.6.tar.gz/AtomicP2P-0.0.6/atomic_p2p/utils/security.py | from typing import Tuple
import hashlib
from os import listdir, getcwd
from os.path import join, isfile, isdir, exists, join
from OpenSSL import crypto
def create_self_signed_cert(
cert_dir: str, cert_file: str = "myapp.crt", key_file: str = "myapp.key"
) -> Tuple[str, str]:
"""
If datacard.crt and dataca... | PypiClean |
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js | (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(X,ah){var j=X.indentUnit;var x=ah.statementIndent;var aw=ah.jsonld... | PypiClean |
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/docs/devel/share.rst | .. _promotion:
Promoting the translation
=========================
Weblate provides you widgets to share on your website or other sources to
promote the translation project. It also has a nice welcome page for new contributors
to give them basic information about the translation. Additionally you can
share informatio... | PypiClean |
/AutoYOLObile-0.0.10.tar.gz/AutoYOLObile-0.0.10/ModelOpt/rt3d_pruning/main_backup.py | import os
import sys
import time
from time import strftime
import shutil
import torch
import torch.optim as optim
import torch.nn.functional as F
import torchvision
import admm
import numpy as np
from network import c3d, s3d
from video_utils.utils import build_dataflow, get_augmentor
from video_utils.video_dataset i... | PypiClean |
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/library/weights/torenbeek_weights.py | import aerosandbox as asb
import aerosandbox.numpy as np
import aerosandbox.tools.units as u
from typing import Dict, Union
# From Torenbeek: "Synthesis of Subsonic Airplane Design", 1976, Delft University Press
# Chapter 8: "Airplane Weight and Balance"
def mass_wing_simple(
wing: asb.Wing,
design_m... | PypiClean |
/Climind-0.1-py3-none-any.whl/climind/readers/reader_gistemp_ts.py |
from pathlib import Path
import itertools
import xarray as xa
import numpy as np
from typing import List
import climind.data_types.grid as gd
import climind.data_types.timeseries as ts
from climind.data_manager.metadata import CombinedMetadata
from climind.readers.generic_reader import read_ts
def build_transfer(... | PypiClean |
/C_easy-0.1.tar.gz/C_easy-0.1/C/__c.py | import os
import re
import ctypes
from ctypes import *
from functools import wraps
from termcolor import cprint
j = os.path.join
uchar_p_size = 1024
P_C_BASETYPE = {
int: c_int,
str: c_char_p,
float: c_float,
}
P_C = {
str: lambda x:c_char_p(x.encode("utf8", "ignore")),
int: lambda x:c_long(x)... | PypiClean |
/DI_engine-0.4.9-py3-none-any.whl/ding/torch_utils/network/resnet.py | from typing import List
import math
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from .nn_module import Flatten
def to_2tuple(item):
if np.isscalar(item):
return (item, item)
else:
return item
# Calculate asymmetric TensorFlow-like 'SAME' padding for a convolution... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/sessions/backends/file.py | import datetime
import errno
import os
import tempfile
from django.conf import settings
from django.contrib.sessions.backends.base import SessionBase, CreateError, VALID_KEY_CHARS
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.utils import timezone
class SessionStore(SessionB... | PypiClean |
/Nbdler-3.0.3.tar.gz/Nbdler-3.0.3/nbdler/client/base_http.py | from wsgiref.headers import Headers
from urllib.parse import urlunparse
from .abstract import AbstractClient
from ..utils import update_range_field
import logging
log = logging.getLogger(__name__)
class BaseHTTPClient(AbstractClient):
NAME = 'base_http'
PROTOCOL_SUPPORT = ('http', 'https')
ASYNC_EXECUTE ... | PypiClean |
/FamilyBudget-0.1.0.tar.gz/FamilyBudget-0.1.0/app/view_top_level.py | import tkinter as tk
import tkinter.ttk as ttk
import locale
class TopLevelBasic(tk.Toplevel):
def __init__(self, vc, *args, **kwargs):
super().__init__(*args, **kwargs)
self.vc = vc
self.configure_win()
self.labels_text = ('Date', 'Sum', 'Comment')
self.win_title = None
... | PypiClean |
/Django_patch-2.2.19-py3-none-any.whl/django/db/backends/sqlite3/creation.py | import os
import shutil
import sys
from django.db.backends.base.creation import BaseDatabaseCreation
class DatabaseCreation(BaseDatabaseCreation):
@staticmethod
def is_in_memory_db(database_name):
return database_name == ':memory:' or 'mode=memory' in database_name
def _get_test_db_name(self):
... | PypiClean |
/Office365-REST-Python-Client-2.4.3.tar.gz/Office365-REST-Python-Client-2.4.3/office365/directory/authentication/methods/phone.py | from office365.directory.authentication.methods.method import AuthenticationMethod
from office365.runtime.queries.service_operation import ServiceOperationQuery
class PhoneAuthenticationMethod(AuthenticationMethod):
"""
Represents a phone number and type that's registered to a user, and whether it's configure... | PypiClean |
/DS2STAC-Ingester-1.0.8.tar.gz/DS2STAC-Ingester-1.0.8/CONTRIBUTING.rst | .. highlight:: shell
============
Contributing
============
Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
----------------------
Report Bugs
~~~~~~~~~~~
Report bugs at https://codebase.h... | PypiClean |
/DjangoDE-0.2.tar.gz/DjangoDE-0.2/djangode/project/project.py |
import logging
import os
import pickle
from django.core.management.commands.startproject import Command as StartProject
from url_model import UrlModel
from djangode import global_objects
from djangode.utils import Runner, RunnerStopped
from project_settings import ProjectSettings
logger = logging.getLogger("django... | PypiClean |
/MaterialDjango-0.2.5.tar.gz/MaterialDjango-0.2.5/materialdjango/static/materialdjango/components/bower_components/prism/components/prism-pure.js | (function (Prism) {
Prism.languages.pure = {
'comment': [
{
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
},
/#!.+/
],
'inline-lang': {
pattern: /%<[\s\S]+?%>/,
greedy: true,
inside: {
'lang': {
pattern: ... | PypiClean |
/BoltzTraP2-22.12.1.tar.gz/BoltzTraP2-22.12.1/examples/TiCoSb.py |
import logging
import os
import os.path
import matplotlib
import matplotlib.pylab as pl
import numpy as np
from ase.dft.kpoints import bandpath, get_special_points
from environment import data_dir
from BoltzTraP2 import (
bandlib,
dft,
fermisurface,
fite,
serialization,
sphere,
units,
)
... | PypiClean |
/BoxKit-2023.6.7.tar.gz/BoxKit-2023.6.7/boxkit/library/_execute.py |
from types import SimpleNamespace
import joblib
import tqdm
from boxkit import options
if options.DASK:
import dask # pylint: disable=unused-import
from dask import distributed
if options.CBOX:
import ctypes # pylint: disable=unused-import
from ..cbox.lib import extern as cbox # pylint: disable=... | PypiClean |
/freespeak-0.2.0.tar.gz/freespeak-0.2.0/freespeak/translators/yahoo.py |
import httplib
import urllib
import lxml.html
from freespeak.translator import BaseTranslator
from freespeak.translation import *
from freespeak.status import *
class Language (object):
def __init__ (self, cc, name):
self.cc = cc # Country Code
self.name = name
def __cmp__ (self, other):
... | PypiClean |
/310_notebook-0.1.0-py3-none-any.whl/310_notebook/labextension/static/remoteEntry.cc8f33c82a29a8d64c2d.js | var _JUPYTERLAB;
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "webpack/container/entry/310_notebook":
/*!***********************!*\
!*** container entry ***!
\***********************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
... | PypiClean |
/CellNet-1.1.1.3-py3-none-any.whl/cellphonedb/src/core/methods/cpdb_statistical_analysis_method.py | import pandas as pd
from cellphonedb.src.core.exceptions.EmptyResultException import EmptyResultException
from cellphonedb.src.core.methods import cpdb_statistical_analysis_simple_method, \
cpdb_statistical_analysis_complex_method
def call(meta: pd.DataFrame,
count: pd.DataFrame,
interactions: ... | PypiClean |
/K_AIKO-0.5.2-py3-none-any.whl/kaiko/devices/terminals.py | import sys
import os
import time
import re
import contextlib
import queue
import threading
import signal
import shutil
import termios
import select
import tty
from typing import Dict
from ..utils import datanodes as dn
from ..utils import markups as mu
from ..utils import config as cfg
@dn.datanode
def ucs_detect():
... | PypiClean |
/DeepGMAP-0.2.0.tar.gz/DeepGMAP-0.2.0/deepgmap/train/deepshark_local_oop_1d.py | import tensorflow as tf
import sys
import numpy as np
import time
import glob
from natsort import natsorted
import getopt
import importlib as il
import matplotlib.pyplot as plt
def next_batch(loop, input_dir, batch_size, data_length):
f = glob.glob(str(input_dir)+"*")
f_srt=natsorted(f)
with np.load(str(f_... | PypiClean |
/Newcalls-0.0.1-cp37-cp37m-win_amd64.whl/newcalls/node_modules/@types/node/ts4.8/fs.d.ts | declare module 'fs' {
import * as stream from 'node:stream';
import { Abortable, EventEmitter } from 'node:events';
import { URL } from 'node:url';
import * as promises from 'node:fs/promises';
export { promises };
/**
* Valid types for path values in "fs".
*/
export type PathLike ... | PypiClean |
/Montreal-Forced-Aligner-3.0.0a3.tar.gz/Montreal-Forced-Aligner-3.0.0a3/docs/source/user_guide/index.rst |
.. _user_guide:
**********
User Guide
**********
What is forced alignment?
=========================
Forced alignment is a technique to take an orthographic transcription of
an audio file and generate a time-aligned version using a pronunciation
dictionary to look up phones for words.
Many languages have :xref:`p... | PypiClean |
/CaptureMock-2.3.0.tar.gz/CaptureMock-2.3.0/capturemock/amqptraffic.py | import pika
from capturemock import traffic, encodingutils
from datetime import datetime
class AMQPConnector:
own_routing_key = "CaptureMock"
terminate_body = b"terminate"
def __init__(self, rcHandler=None, servAddr=None, connName=None):
if rcHandler is not None:
self.url = rcHandler.ge... | PypiClean |
/MacroPy-1.0.3.zip/MacroPy-1.0.3/macropy/experimental/tco.py | from macropy.core.macros import *
from macropy.experimental.pattern import macros, switch, _matching, ClassMatcher, NameMatcher
from macropy.core.hquotes import macros, hq
__all__ = ['tco']
macros = Macros()
in_tc_stack = [False]
@singleton
class TcoIgnore:
pass
@singleton
class TcoCall:
pass
def trampo... | PypiClean |
/Allagash-0.4.3.tar.gz/Allagash-0.4.3/allagash/coverage.py | import random
import string
import pandas as pd
class Coverage:
def __init__(
self,
dataframe,
demand_col=None,
demand_name="demand",
supply_name=None,
coverage_type="binary",
):
"""
An object that stores the relationship between a set of demand ... | PypiClean |
/Flask-Jerify-0.0.25.tar.gz/Flask-Jerify-0.0.25/README.md | # Flask-Jerify
"JSON Verify". Easy validation against JSON schemas for Flask APIs.
Leverages `jsonschema`.
## Installation
```
pip install flask-jerify
```
## Usage
### Loading JSON Schemas
`flask-jerify` will by default look for a `./schemas` directory in the running
directory and read all `.schema.json` files... | PypiClean |
/MastoWrapper-1.0.4.tar.gz/MastoWrapper-1.0.4/README.md | # MastoWrapper

## Mastodon Python Wrapper
MastoWrapper is a Mastodon API wrapper dedicated to providing a simplistic but powerful integration to allow for application development for th... | PypiClean |
/LinOTP-2.11.1.tar.gz/LinOTP-2.11.1/linotp/tokens/motp/motptoken.py | from linotp.lib.crypto import SecretObj
from linotp.tokens.motp import mTimeOtp
from linotp.tokens.base import TokenClass
from linotp.lib.context import request_context as context
from linotp.lib.error import ParameterError
from linotp.tokens import tokenclass_registry
import logging
log = logging.getLogger(__name__)... | PypiClean |
/LiBai-0.1.1.tar.gz/LiBai-0.1.1/libai/data/data_utils/split_dataset.py |
import logging
import numpy as np
import oneflow as flow
logger = logging.getLogger(__name__)
def split_ds(ds, split=None, shuffle=False, save_splits=None, load_splits=None):
"""
Split a dataset into subsets given proportions of how
much to allocate per split. If a split is 0% returns None for that spl... | PypiClean |
/Flask-Storm-1.0.0.tar.gz/Flask-Storm-1.0.0/README.rst | Flask-Storm
===========
|test-status| |pypi-version|
Flask-Storm is an extension for `Flask <https://www.palletsprojects.com/p/flask/>`_ that adds support for Canonical's ORM `Storm <https://storm.canonical.com/>`_ to your application. Flask-Storm automatically opens and closes database connections on demand when requ... | PypiClean |
/Office365_REST_with_timeout-0.1.1-py3-none-any.whl/office365/sharepoint/navigation/navigation_service.py | from office365.runtime.client_result import ClientResult
from office365.runtime.queries.service_operation_query import ServiceOperationQuery
from office365.runtime.resource_path import ResourcePath
from office365.sharepoint.base_entity import BaseEntity
from office365.sharepoint.navigation.menu_state import MenuState
... | PypiClean |
/netket-3.9.2.tar.gz/netket-3.9.2/netket/operator/_ising/base.py |
from typing import Optional, Union
import numpy as np
from jax import numpy as jnp
from netket.graph import AbstractGraph
from netket.hilbert import AbstractHilbert
from netket.utils.numbers import dtype as _dtype
from netket.utils.types import Array, DType
from .. import spin
from .._hamiltonian import SpecialHam... | PypiClean |
/ORE_strhub-0.0.1-py3-none-any.whl/strhub/data/dataset.py | import glob
import io
import logging
import unicodedata
from pathlib import Path, PurePath
from typing import Callable, Optional, Union
import lmdb
from PIL import Image
from torch.utils.data import Dataset, ConcatDataset
from strhub.data.utils import CharsetAdapter
log = logging.getLogger(__name__)
def build_tree... | PypiClean |
/GamesmanPuzzles-0.0.4-cp36-cp36m-manylinux2010_x86_64.whl/puzzlesolver/python/puzzles/topspin.py | from copy import deepcopy
from . import ServerPuzzle
from ..util import *
from ..solvers import SqliteSolver
from hashlib import sha1
import random
class TopSpin(ServerPuzzle):
puzzleid = 'top_spin'
variants = {'6_2' : SqliteSolver}
test_variants = variants
def __init__(self, size = 6, spin = 2, **kwargs):
sel... | PypiClean |
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Simulator/Channels/IPChannel.py |
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocols |
#+-... | PypiClean |
/GoogleAppEngineMapReduce-1.9.22.0.tar.gz/GoogleAppEngineMapReduce-1.9.22.0/mapreduce/namespace_range.py | # pylint: disable=g-bad-name
__all__ = [
'NAMESPACE_CHARACTERS',
'MAX_NAMESPACE_LENGTH',
'MAX_NAMESPACE',
'MIN_NAMESPACE',
'NAMESPACE_BATCH_SIZE',
'NamespaceRange',
'get_namespace_keys',
]
import itertools
import string
from google.appengine.api import datastore
from google.appengine.ext ... | PypiClean |
/Euphorie-15.0.2.tar.gz/Euphorie-15.0.2/src/euphorie/client/resources/oira/script/chunks/25667.da3d79ce09c119c3ce6f.min.js | "use strict";(self.webpackChunk_patternslib_patternslib=self.webpackChunk_patternslib_patternslib||[]).push([[25667],{39953:function(n,e,t){var o=t(87537),r=t.n(o),s=t(23645),l=t.n(s)()(r());l.push([n.id,".hljs-comment,.hljs-quote{color:#7285b7}.hljs-variable,.hljs-template-variable,.hljs-tag,.hljs-name,.hljs-selector-... | PypiClean |
/Amara-2.0.0a6.tar.bz2/Amara-2.0.0a6/lib/thirdparty/html5lib/treebuilders/_base.py | from amara.thirdparty.html5lib.constants import scopingElements, tableInsertModeElements, namespaces
try:
frozenset
except NameError:
# Import from the sets module for python 2.3
from sets import Set as set
from sets import ImmutableSet as frozenset
# The scope markers are inserted when entering button... | PypiClean |
/CirqProjectQ-0.2.3.tar.gz/CirqProjectQ-0.2.3/examples/siam_cirq.py | from numbers import Number
import numpy as np
import cirq
from cirq.google import xmon_gates, xmon_qubit
from cirq.contrib.qcircuit_diagram import circuit_to_latex_using_qcircuit
def nearest_neighbor_hopping(amplitude, qubits):
"""
Implement a nearest neighbor hopping step between two electrons using xmon
... | PypiClean |
/EMD_signal-1.5.1-py3-none-any.whl/PyEMD/experimental/jitemd.py | import logging
from typing import Optional, Tuple
import numba as nb
import numpy as np
from numba.types import float64, int64, unicode_type
from scipy.interpolate import Akima1DInterpolator, interp1d
FindExtremaOutput = Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
default_emd_config = nb.typed... | PypiClean |
/MiSeqHashR-0.0.2.tar.gz/MiSeqHashR-0.0.2/README.md | # MiSeqHashR
Create and store MD5 hashes of Illumina .fastq.gz files from sequencing runs
[](https://dl.circleci.com/status-badge/redirect/gh/OLC-Bioinformatics/MiSeqHashR/tree/main)
[{"use strict";function w(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function P(e){return!(null==e)}function _(){}function o(e){return function(){return e}}function e(e){return e}function t(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return n=type... | PypiClean |
/MDOF_toybox-0.2.2-py3-none-any.whl/toybox/base.py | import warnings
import numpy as np
from toybox.integrators import integrator, rk4
from toybox.forcings import shaker
# %% Notation reference
_Notation = {
# Misc.
'n': 'number of points',
'd': 'number of DOFS',
't': 'time (float)',
'ts': 'time vector (vector)',
'w': 'system state (vector 2dx... | PypiClean |
/Dejavu-1.5.0.zip/Dejavu-1.5.0/dejavu/units.py | try:
from decimal import Decimal as decimal
except ImportError:
decimal = None
try:
import cPickle as pickle
except ImportError:
import pickle
import sha
import types
import warnings
from dejavu import errors
__all__ = ['UnitAssociation', 'ToMany', 'ToOne', 'UnitJoin',
'Unit', 'UnitPrope... | PypiClean |
/FrameDuino-0.2.1.tar.gz/FrameDuino-0.2.1/frameduino/drivers/cdc_driver.py |
import serial
import os
from abstract_driver import AbstractDriver
if os.name == "posix": #GNU/Linux
os.environ["PORTNAME"] = "/dev/ttyACM%d"
elif os.name == "nt": #Windows
os.environ["PORTNAME"] = "COM%d"
#ERRORS
PORTS_NOT_FOUND = "No open ports found or no device connected."
PORT_NOT_CONNECTED = "... | PypiClean |
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/mobile/app/_event.js.uncompressed.js | define("dojox/mobile/app/_event", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.mobile.app._event");
dojo.experimental("dojox.mobile.app._event.js");
dojo.mixin(dojox.mobile.app, {
eventMap: {},
connectFlick: function(target, context, method){
// summary:
// Listens for a flick even... | PypiClean |
/DEME-0.2.8.tar.gz/DEME-0.2.8/thirdparty/pybind11/docs/release.rst | On version numbers
^^^^^^^^^^^^^^^^^^
The two version numbers (C++ and Python) must match when combined (checked when
you build the PyPI package), and must be a valid `PEP 440
<https://www.python.org/dev/peps/pep-0440>`_ version when combined.
For example:
.. code-block:: C++
#define PYBIND11_VERSION_MAJOR X
... | PypiClean |
/DXR-1.9.4.tar.gz/DXR-1.9.4/test/Dxr_grpc/audios_pb2_grpc.py | """Client and server classes corresponding to protobuf-defined services."""
import grpc
from . import audios_pb2 as audios__pb2
class MainServerStub(object):
"""responce server
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
... | PypiClean |
/GeoNode-3.2.0-py3-none-any.whl/geonode/static/geonode/js/jszip/preview.js | var inputData = {},
geoData = {},
EPSGUser, url, encoding, EPSG,
EPSG4326 = proj4('EPSG:4326');
function loadshp(config, returnData) {
url = config.url;
encoding = typeof config.encoding != 'undefined' ? config.encoding : 'utf-8';
EPSG = typeof config.EPSG != 'undefined' ? config.EPSG : 4326;
loadEPSG... | PypiClean |
/Fanery-0.2.5.tar.gz/Fanery-0.2.5/docs/window-system.rst | aptitude -t wheezy-backports install xorg spectrwm xdm schroot uswsusp conky arandr git-flow
cat > ~/.conkyrc <<EOF
out_to_x no
out_to_console yes
update_interval 1.0
total_run_times 0
use_spacer none
TEXT
{time %R %a,%d-%#b-%y} |Up:${uptime_short} |Temp:${acpitemp}C |Batt:${battery_short} |RAM:$memperc% |CPU:${cpu}% |... | PypiClean |
/DisPass-0.4.0.tar.gz/DisPass-0.4.0/dispass/cli.py |
# Copyright (c) 2012-2016 Tom Willemse <tom@ryuslash.org>
# Copyright (c) 2011-2018 Benjamin Althues <benjamin@babab.nl>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice app... | PypiClean |
/Mopidy-WebLibrary-1.0.0.tar.gz/Mopidy-WebLibrary-1.0.0/mopidy_weblibrary/static/vendors/jquery_fileupload/cors/jquery.xdr-transport.js |
;(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS:
factory(require('jquery'));
} else {
// Browser... | PypiClean |
/ABBA-QuPath-RegistrationExporter-0.4.2.tar.gz/ABBA-QuPath-RegistrationExporter-0.4.2/regexport/views/plot_3d.py | from pathlib import Path
from typing import Optional
import numpy as np
from traitlets import HasTraits, Instance, directional_link
from vedo import Plotter, Mesh, Points
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from regexport.model import AppState
from regexport.utils.point_clo... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/http/request.py | from __future__ import absolute_import, unicode_literals
import copy
import os
import re
import sys
import warnings
from io import BytesIO
from pprint import pformat
try:
from urllib.parse import parse_qsl, urlencode, quote, urljoin
except ImportError:
from urllib import urlencode, quote
from urlparse impo... | PypiClean |
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/db/backends/postgresql_psycopg2/operations.py | from __future__ import unicode_literals
from django.db.backends import BaseDatabaseOperations
class DatabaseOperations(BaseDatabaseOperations):
def __init__(self, connection):
super(DatabaseOperations, self).__init__(connection)
def date_extract_sql(self, lookup_type, field_name):
# http://w... | PypiClean |
/NewLifeUtils-5.2.1.tar.gz/NewLifeUtils-5.2.1/README.md | ## stats



:
"""Exception for the Environment"""
class EnvironmentManager:
"""Manage the Environment for an application"""
environment = None
@classmethod
def define_environment_cls(cls, Environment):
"""Defin... | PypiClean |
/MultiRunnable-0.17.0a2-py3-none-any.whl/multirunnable/coroutine/synchronization.py | from gevent.threading import Lock as _Greenlet_Lock
from gevent.lock import (
RLock as _Greenlet_RLock,
Semaphore as _Greenlet_Semaphore,
BoundedSemaphore as _Greenlet_BoundedSemaphore)
from gevent.event import Event as _Greenlet_Event
from asyncio.locks import (
Lock as _Async_Lock,
Semaphore as _... | PypiClean |
/Bluebook-0.0.1.tar.gz/Bluebook-0.0.1/pylot/component/static/pylot/vendor/mdeditor/bower_components/codemirror/addon/fold/brace-fold.js | CodeMirror.registerHelper("fold", "brace", function(cm, start) {
var line = start.line, lineText = cm.getLine(line);
var startCh, tokenType;
function findOpening(openCh) {
for (var at = start.ch, pass = 0;;) {
var found = lineText.lastIndexOf(openCh, at - 1);
if (found == -1) {
if (pass =... | PypiClean |
/DolaBot-Slate-1.0.1.tar.gz/DolaBot-Slate-1.0.1/README.md | # Dola
Dola is a Python-based bot specialising in Splatoon and [Slapp](https://github.com/kjhf/SplatTag) but also comes with some utility functions.
Code on [Github](https://github.com/kjhf/DolaBot).
Import prefix is `DolaBot`.
## Requirements
- Python 3.9+
## Bot Setup
* Create a `.env` in the repository root with ... | PypiClean |
/EnergySystemModels-0.1.17.post63-py3-none-any.whl/NodeEditor/nodeeditor/node_scene.py | import os
import json
from collections import OrderedDict
from NodeEditor.nodeeditor.utils import dumpException
from NodeEditor.nodeeditor.node_serializable import Serializable
from NodeEditor.nodeeditor.node_graphics_scene import QDMGraphicsScene
from NodeEditor.nodeeditor.node_node import Node
from NodeEditor.nodeedi... | PypiClean |
/LearnPythonPackaging-0.0.1-py3-none-any.whl/framework/trigger.py | import time
from abc import abstractmethod
from datetime import datetime
import keyboard
class SendOperation:
def __init__(self, node):
self.node = node
def send(self, batch):
self.node.send(batch)
class PrintOperation:
def __init__(self, node):
self.node = node
def prin... | PypiClean |
/IPy-1.01.tar.gz/IPy-1.01/README.rst | IPy - class and tools for handling of IPv4 and IPv6 addresses and networks.
Website: https://github.com/autocracy/python-ipy/
Presentation of the API
=======================
The IP class allows a comfortable parsing and handling for most
notations in use for IPv4 and IPv6 addresses and networks. It was
greatly inspi... | PypiClean |
/CloudReg-1.0.1-py3-none-any.whl/cloudreg/scripts/parastitcher.py | import os, sys, shutil, time, datetime, operator, platform
from math import *
from glob import glob
from mpi4py import MPI
from collections import deque
from subprocess import *
import os.path, pickle
prefix = ""
debug_level = 0
default_tile_size = 256
resume_status_fname = "para_resume_status.bin"
suspend_resume_enab... | PypiClean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.