id
stringlengths
1
265
text
stringlengths
6
5.19M
dataset_id
stringclasses
7 values
/Electrum-CHI-3.3.8.tar.gz/Electrum-CHI-3.3.8/electrum_chi/electrum/gui/stdio.py
from decimal import Decimal import getpass import datetime import logging from electrum import WalletStorage, Wallet from electrum.util import format_satoshis from electrum.bitcoin import is_address, COIN, TYPE_ADDRESS from electrum.transaction import TxOutput from electrum.network import TxBroadcastError, BestEffortR...
PypiClean
/IdracRedfishSupportTest-0.0.7.tar.gz/IdracRedfishSupportTest-0.0.7/GetSystemHWInventoryREDFISH.py
import argparse import getpass import json import logging import os import re import requests import subprocess import sys import time import warnings from datetime import datetime from pprint import pprint warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(description="Python script using Redfish A...
PypiClean
/Boodler-2.0.3.tar.gz/Boodler-2.0.3/src/boopak/pinfo.py
import sys import os.path import types import re import sets import codecs import cStringIO from boopak import version class PackageInfo: """PackageInfo: represents a single package. A PackageInfo is not the imported module object which a Boodler module sees from the inside. It's a wrapper around that. ...
PypiClean
/NeuroUnits-0.1.2.tar.gz/NeuroUnits-0.1.2/src/neurounits/visitors/bases/base_actioner_default.py
# ------------------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. 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 sourc...
PypiClean
/CRIkit2-0.4.4.tar.gz/CRIkit2-0.4.4/crikit/preprocess/subtract_baseline.py
import copy as _copy import numpy as _np from crikit.preprocess.algorithms.als import (AlsCvxopt as _AlsCvxopt) from crikit.utils.datacheck import _rng_is_pix_vec class SubtractBaselineALS: """ Subtract baseline using asymmetric least squares algorithm Parameters ---------- smoothness_para...
PypiClean
/Moose-0.9.9b3.tar.gz/Moose-0.9.9b3/docs/drafts/milestones/r1.0.md
# Moose Milestone(release/1.0) - - - - ## 总体要求 * 时间上,要求在 _10月8号_ 之前完成版本1.0的编码和测试工作; * 功能上: * 能对**automate**中95%的代码提供默认或仅需极少编码的实现; * 对重要但不在本次发布中提供的功能预留接口和说明; * 质量上,整体代码覆盖率要提升到50%,频繁使用的功能需要提升覆盖率到85%以上; * 维护上: * 提供 **command**,**actions**,**connection**的说明文档; * 对构成完整功能单元的模块(尤其对由单个文件构成的)提供头注释,说明该模块的主要设计目的,类提供功能和参数注释; ...
PypiClean
/EUKulele-2.0.0.tar.gz/EUKulele-2.0.0/code_of_conduct.md
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex cha...
PypiClean
/MagicDrCOM-1.2.0-py3-none-any.whl/drcom/main/tool.py
import sys import time import struct import socket import random import threading from drcom.main.utils import mac from drcom.main.utils import hostname from drcom.main.utils import ipaddress from drcom.main.utils import md5 from drcom.main.utils import checksum from drcom.main.utils import int2hex_str from drcom.mai...
PypiClean
/CodeChat_Server-0.2.18.tar.gz/CodeChat_Server-0.2.18/CodeChat_Server/renderer.py
import asyncio import codecs from contextlib import contextmanager from enum import Enum, auto import fnmatch import io import json import os from pathlib import Path import re import shlex import shutil import sys from tempfile import NamedTemporaryFile from typing import ( Any, cast, Callable, Corouti...
PypiClean
/EStruct-0.1.3.tar.gz/EStruct-0.1.3/README.txt
======= EStruct ======= EStruct provides an extended packaging/unpackaging library that that provided by the standard library's Struct module. It provides packaging of conditional elements and arrays. The library was originally written by the author to simplify packing and unpacking binary data within mpeg4 file. Ty...
PypiClean
/Auto_FOX-1.0.0b1-py3-none-any.whl/FOX/functions/adf.py
from __future__ import annotations import sys from typing import ( Sequence, Hashable, Iterable, Callable, TypeVar, Tuple, List, Any, TYPE_CHECKING, ) import numpy as np import pandas as pd from scipy.spatial import cKDTree from scipy.spatial.distance import cdist if TYPE_CHECKING...
PypiClean
/KD_Lib-0.0.32.tar.gz/KD_Lib-0.0.32/KD_Lib/Quantization/qat/qat.py
from copy import deepcopy import torch from KD_Lib.Quantization.common import Quantizer class QAT_Quantizer(Quantizer): """ Implementation of Quantization-Aware Training (QAT) for PyTorch models. :param model: (Quantizable) Model that needs to be quantized :type model: torch.nn.Module :param tr...
PypiClean
/FlexGet-3.9.6-py3-none-any.whl/flexget/components/notify/notifiers/rapidpush.py
import json from loguru import logger from requests.exceptions import RequestException from flexget import plugin from flexget.config_schema import one_or_more from flexget.event import event from flexget.plugin import PluginWarning from flexget.utils.requests import Session as RequestSession from flexget.utils.reque...
PypiClean
/BIT_Online_Code_Helper-1.0.4-py3-none-any.whl/bit_online_code_helper/bitonline/OnlineTestCodeManager.py
import re import time from bit_online_code_helper.log.LogManager import * class _CompileStatus(Enum): PENDING = '正等待编译' COMPILE_ERROR = '程序编译失败' COMPILE_SUCCESS = '程序已处理完毕' class _OnlineTestCodeManager: def __init__(self): self.__headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT...
PypiClean
/HAPI_Nile-1.6.0-py3-none-any.whl/Hapi/rrm/routing.py
from typing import Union import numpy as np class Routing: """Routing class contains routing method. Methods ------- 1- Muskingum 2- Muskingum_V 3- TriangularRouting1 functions : 1- CalculateWeights 4- TriangularRouting2 functions 1- Tf """ def __...
PypiClean
/NlvWxPython-4.2.0-cp37-cp37m-win_amd64.whl/wx/lib/agw/ribbon/art.py
# RibbonArtSetting RIBBON_ART_TAB_SEPARATION_SIZE = 1 RIBBON_ART_PAGE_BORDER_LEFT_SIZE = 2 RIBBON_ART_PAGE_BORDER_TOP_SIZE = 3 RIBBON_ART_PAGE_BORDER_RIGHT_SIZE = 4 RIBBON_ART_PAGE_BORDER_BOTTOM_SIZE = 5 RIBBON_ART_PANEL_X_SEPARATION_SIZE = 6 RIBBON_ART_PANEL_Y_SEPARATION_SIZE = 7 RIBBON_ART_TOOL_GROUP_SEPARATION_SIZE ...
PypiClean
/Linum-0.9.12.tar.gz/Linum-0.9.12/linum/svg_renderer/calendar/views/layer_list_view.py
import tkinter from datetime import date, timedelta from typing import Optional from svgwrite import Drawing from svgwrite.shapes import Rect from linum.layer_list import LayerList from linum.svg_renderer.base.style import Style from linum.svg_renderer.calendar.views.layer_view import LayerView class LayerListView:...
PypiClean
/HOGBEN-1.2.1.tar.gz/HOGBEN-1.2.1/README.md
[![DOI](https://zenodo.org/badge/366323997.svg)](https://zenodo.org/badge/latestdoi/366323997) # HOGBEN **H**olistic **O**ptimization for **G**aining **B**etter **E**vidence from **N**eutrons ## About the Project **For the original repositories that this work is based on, see [fisher-information](https://github.com/J...
PypiClean
/Digenpy-1.4.1.linux-i686.tar.gz/usr/local/lib/python2.7/dist-packages/Digenpy_/Spanish.py
import string, hashlib class Dlink(): def __init__(self, *args): if not len(args[0]) > 1: self.return_=1 return self.sm=args[0][1].split(':') self.dicts=[] self.S2=self.hexa_minus_one(self.sm[-1][1]) self.S1="" if self.sm[-1][1] is 0: self.S1=...
PypiClean
/FaSh-0.0.4.tar.gz/FaSh-0.0.4/README.md
# iSpace 应用标准化开发框架法式(FaSh) v0.0.3 ## 简介 iSpace 应用标准化开发框架法式(Fash)有助于快速构建 iSpace 应用。通过遵守一定的文件组织方式和通信格式,FaSh 能够帮助开发者监视素材文件夹、初始化数据库、以多进程方式运行 iSpace 组件,并以 Redis 为中介实现进程间通信。此外,通过 Node-Red 还可以进一步拓展不同类型的组件,实现多种传感器、反应器、学习器、数据库的接入。 FaSh 库的数据存储依赖 SQlite,SQlite 是一个软件库,实现了自给自足的、无服务器的、零配置的、事务性的 SQL 数据库引擎, 简而言之能够在本地建立数据库,其数据结构近似于 E...
PypiClean
/dirtrav-1.0.0.tar.gz/dirtrav-1.0.0/src/flask/app.py
import functools import inspect import json import logging import os import sys import typing as t import weakref from collections.abc import Iterator as _abc_Iterator from datetime import timedelta from itertools import chain from threading import Lock from types import TracebackType import click from werkzeug.datast...
PypiClean
/DuHast-1.0.7-py3-none-any.whl/duHast/APISamples/Revit_Categories.py
import clr import System from System.Collections.Generic import List import RevitCommonAPI as com import RevitFamilyUtils as rFamUtils import RevitLinks as rLink import Result as res import RevitLineStylesPatterns as rPat clr.AddReference('System.Core') clr.ImportExtensions(System.Linq) import Autodesk.Revit.DB as ...
PypiClean
/dr14-t.meter-1.0.16.tar.gz/dr14-t.meter-1.0.16/dr14tmeter/dynamic_range_meter.py
import os import threading import sys import codecs import tempfile import multiprocessing as mp from ctypes import Structure, c_double, c_wchar_p, c_int from dr14tmeter.compute_dr14 import compute_dr14 from dr14tmeter.compute_drv import compute_DRV from dr14tmeter.compute_dr import * from dr14tmeter.audio_track imp...
PypiClean
/B9gemyaeix-4.14.1.tar.gz/B9gemyaeix-4.14.1/weblate/addons/management/commands/list_addons.py
from textwrap import wrap from weblate.addons.events import EVENT_NAMES from weblate.addons.models import ADDONS, Addon from weblate.trans.models import Component, Project from weblate.utils.management.base import BaseCommand class Command(BaseCommand): help = "List installed add-ons" @staticmethod def...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/code_generation/AttributeCodes.py
from nuitka import Options from .CodeHelpers import ( decideConversionCheckNeeded, generateChildExpressionsCode, generateExpressionCode, withObjectCodeTemporaryAssignment, ) from .ErrorCodes import getErrorExitBoolCode, getErrorExitCode, getReleaseCode from .PythonAPICodes import ( generateCAPIObje...
PypiClean
/FlaskCms-0.0.4.tar.gz/FlaskCms-0.0.4/flask_cms/static/js/ckeditor/lang/bn.js
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang['bn']={"dir":"ltr","editor":"Rich Text Editor","common":{"editorHelp":"Press ALT 0 for help","browseServer":"ব্রাউজ সার্ভার","url":"URL","protocol":"প্রোটোকল","...
PypiClean
/MSM_PELE-1.1.1-py3-none-any.whl/Helpers/system_prep.py
import os import subprocess import argparse import MSM_PELE.Helpers.pele_env as pl import MSM_PELE.constants as cs class SystemBuilder(pl.EnviroBuilder): def __init__(self, receptor, ligand, residue, pele_dir): self.receptor = receptor self.ligand = ligand self.residue = residue sel...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/editor/plugins/ShowBlockNodes.js.uncompressed.js
define("dojox/editor/plugins/ShowBlockNodes", [ "dojo", "dijit", "dojox", "dijit/_editor/_Plugin", "dijit/form/Button", "dijit/form/ToggleButton", "dojo/_base/connect", "dojo/_base/declare", "dojo/i18n", "dojo/i18n!dojox/editor/plugins/nls/ShowBlockNodes" ], function(dojo, dijit, dojox) { dojo.declare("dojox...
PypiClean
/ConferenceCorpus-0.1.1.tar.gz/ConferenceCorpus-0.1.1/corpus/datasources/confref.py
import html import re import os import json from corpus.event import Event,EventSeries,EventManager,EventSeriesManager from corpus.eventcorpus import EventDataSourceConfig,EventDataSource from lodstorage.storageconfig import StorageConfig from lodstorage.sql import SQLDB from ptp.ordinal import Ordinal class Confref(E...
PypiClean
/MTGProxyPrinter-0.25.0.tar.gz/MTGProxyPrinter-0.25.0/mtg_proxy_printer/document_controller/page_actions.py
# 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 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # bu...
PypiClean
/DLTA-AI-1.1.tar.gz/DLTA-AI-1.1/DLTA_AI_app/mmdetection/configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py
_base_ = '../retinanet/retinanet_r50_caffe_fpn_1x_coco.py' model = dict( bbox_head=dict( _delete_=True, type='GARetinaHead', num_classes=80, in_channels=256, stacked_convs=4, feat_channels=256, approx_anchor_generator=dict( type='AnchorGenerator', ...
PypiClean
/GloboNetworkAPI-0.9.6.tar.gz/GloboNetworkAPI-0.9.6/networkapiclient/ApiObjectType.py
from networkapiclient.ApiGenericClient import ApiGenericClient from networkapiclient.utils import build_uri_with_ids class ApiObjectType(ApiGenericClient): def __init__(self, networkapi_url, user, password, user_ldap=None): """Class constructor receives parameters to connect to the networkAPI. :p...
PypiClean
/HallPy_Teach-0.1.7.tar.gz/HallPy_Teach-0.1.7/src/HallPy_Teach/__init__.py
import re import pyvisa from .experiments import curieWeiss, hallEffect from IPython.core.display import display from IPython.display import clear_output import ipywidgets as widgets from .constants import supportedInstruments, serialRegex from .helper import reconnectInstructions, getInstTypeCount, filterArrByKey a...
PypiClean
/CHSPy-1.2.2.tar.gz/CHSPy-1.2.2/docs/index.rst
CHSPy (Cubic Hermite Splines for Python) ======================================== This module provides Python tools for `cubic Hermite splines <https://en.wikipedia.org/wiki/Cubic_Hermite_spline>`_ with one argument (time) and multiple values (:math:`ℝ→ℝ^n`). It was branched of from `JiTCDDE <http://github.com/neuroph...
PypiClean
/GoogleAppEnginePipeline-1.9.22.1.tar.gz/GoogleAppEnginePipeline-1.9.22.1/pipeline/ui/jquery.json.min.js
(function($){$.toJSON=function(o) {if(typeof(JSON)=='object'&&JSON.stringify) return JSON.stringify(o);var type=typeof(o);if(o===null) return"null";if(type=="undefined") return undefined;if(type=="number"||type=="boolean") return o+"";if(type=="string") return $.quoteString(o);if(type=='object') {if(typeof o.toJSON=="f...
PypiClean
/Ardy-0.0.6.tar.gz/Ardy-0.0.6/ardy/config/__init__.py
from __future__ import unicode_literals, print_function import json import os from abc import ABCMeta from ardy.config.exceptions import ArdyRequiredKeyError from ardy.core.exceptions import ArdyLambdaNotExistsError from ardy.core.exceptions import ArdyNoFileError, ArdyNoDirError, ArdyEnvironmentNotExistsError from a...
PypiClean
/Mopidy-Mopify-1.7.3.tar.gz/Mopidy-Mopify-1.7.3/mopidy_mopify/static/debug/src/app/search/search.controller.js
'use strict'; // Declare app level module which depends on views, and components angular.module('mopify.search', [ 'spotify', 'ngRoute', 'cfp.hotkeys', 'mopify.services.spotifylogin', 'mopify.services.mopidy', 'mopify.services.station', 'mopify.services.util', 'mopify.widgets.directive.playlist', 'mop...
PypiClean
/Django-Pizza-16.10.1.tar.gz/Django-Pizza-16.10.1/pizza/kitchen_sink/static/ks/ckeditor/lang/gl.js
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang['gl']={"editor":"Editor de texto mellorado","editorPanel":"Rich Text Editor panel","common":{"editorHelp":"Prema ALT 0 para obter axuda","browseServer":"Examina...
PypiClean
/GBT_parser-1.0.3-py3-none-any.whl/cantools/subparsers/decode.py
import argparse import logging import sys from argparse_addons import Integer from .. import database, logreader from .__utils__ import format_message_by_frame_id logging.basicConfig(level=logging.WARNING) def _do_decode(args): dbase = database.load_file(args.database, encoding=ar...
PypiClean
/AWSScout2-3.2.1.tar.gz/AWSScout2-3.2.1/README.rst
########## AWS Scout2 ########## .. image:: https://travis-ci.org/nccgroup/Scout2.svg?branch=master :target: https://travis-ci.org/nccgroup/Scout2 .. image:: https://coveralls.io/repos/github/nccgroup/Scout2/badge.svg?branch=master :target: https://coveralls.io/github/nccgroup/Scout2 .. image:: https...
PypiClean
/BespON-0.6.0.tar.gz/BespON-0.6.0/bespon/astnodes.py
# pylint: disable=C0301 from __future__ import (division, print_function, absolute_import, unicode_literals) import collections import itertools from . import grammar from . import load_types from . import erring OPEN_INDENTATION_LIST = grammar.LIT_GRAMMAR['open_indentation_list'] INLINE_ELE...
PypiClean
/FreePyBX-1.0-RC1.tar.gz/FreePyBX-1.0-RC1/freepybx/public/js/dojox/geo/charting/Feature.js
define("dojox/geo/charting/Feature",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/html","dojo/dom","dojo/_base/event","dojox/gfx/fx","dojox/color"],function(_1,_2,_3,_4,_5,_6,fx,_7){ return _2("dojox.geo.charting.Feature",null,{_isZoomIn:false,isSelected:false,markerText:null,constructor:functi...
PypiClean
/MapProxy-1.16.0.tar.gz/MapProxy-1.16.0/mapproxy/script/conf/utils.py
from copy import copy from mapproxy.compat import iteritems __all__ = ['update_config', 'MapProxyYAMLDumper'] def update_config(conf, overwrites): wildcard_keys = [] for k, v in iteritems(overwrites): if k == '__all__': continue if k.startswith('___') or k.endswith('___'): ...
PypiClean
/FlyBIDS-0.0.2.tar.gz/FlyBIDS-0.0.2/README.md
# FlyBIDS Quickly build and inspect Flywheel BIDS data. # Installation - Development version: Clone this repo and install the package with `pip` ``` git clone https://github.com/PennLINC/FlyBIDS.git cd FlyBIDS pip install -e . ``` - Stable Releases: Download from Pip: ``` pip install FlyBIDS ``` # Examples ```p...
PypiClean
/AsyncDex-1.1.tar.gz/AsyncDex-1.1/asyncdex/models/chapter.py
import asyncio import re from datetime import datetime from logging import getLogger from os import makedirs from os.path import exists, join from typing import Any, Dict, List, Optional, TYPE_CHECKING, Tuple from aiohttp import ClientError from .abc import GenericModelList, Model from .group import Group from .mixin...
PypiClean
/Brainfeatures-0.0.4.tar.gz/Brainfeatures-0.0.4/brainfeatures/data_set/tuh_abnormal.py
from collections import OrderedDict from glob import glob import logging import re import pandas as pd import numpy as np from brainfeatures.data_set.abstract_data_set import DataSet from brainfeatures.utils.file_util import (natural_key, parse_age_and_gender_from_edf_header...
PypiClean
/ActiveReign-1.0.5.tar.gz/ActiveReign-1.0.5/ar3/ops/shell/__init__.py
import os from ar3.core.smb import SmbCon from ar3.servers.smb import SMBServer from ar3.core.connector import Connector from ar3.helpers.misc import gen_random_string from ar3.ops.enum.host_enum import code_execution class AR3Shell(Connector): def __init__(self, args, db_obj, config_obj, loggers): Connect...
PypiClean
/Nuitka-1.8.tar.gz/Nuitka-1.8/nuitka/nodes/ImportHardNodes.py
""" Nodes representing more trusted imports. """ from nuitka.importing.Importing import locateModule, makeModuleUsageAttempt from nuitka.utils.ModuleNames import ModuleName from .ExpressionBases import ExpressionBase class ExpressionImportHardBase(ExpressionBase): # Base classes can be abstract, pylint: disable...
PypiClean
/KiwiCoder-0.3.tar.gz/KiwiCoder-0.3/kiwi/plugin/hardware/control/phidget.py
from Phidget22.Devices.DigitalOutput import DigitalOutput from kiwi.common import PeripheryUsage from kiwi.common.common import class_mock_enable from kiwi.core import ControlPeriphery from threading import Timer, Lock class PhidgetRelayPort(object): def __init__(self, vintport, channel, hold_duty=1.0, hit_del...
PypiClean
/IdracRedfishSupport-0.0.8.tar.gz/IdracRedfishSupport-0.0.8/SupportAssistCollectionLocalREDFISH.py
import argparse import getpass import json import logging import re import requests import sys import time import urllib.parse import warnings from datetime import datetime from pprint import pprint warnings.filterwarnings("ignore") parser = argparse.ArgumentParser(description="Python script using Redfish API with ...
PypiClean
/Flask_Turnstile-0.1.1-py3-none-any.whl/flask_turnstile.py
__NAME__ = "Flask-Turnstile" __version__ = "0.1.1" __license__ = "MIT" __author__ = "Kristian (originally ReCaptcha by Mardix)" __copyright__ = "(c) 2023 Kristian (originally ReCaptcha by Mardix 2015)" try: from flask import request try: from jinja2 import Markup except ImportError: from ma...
PypiClean
/MDSuite-0.2.0-py3-none-any.whl/mdsuite/calculators/green_kubo_ionic_conductivity.py
from abc import ABC from dataclasses import dataclass import numpy as np import tensorflow as tf import tensorflow_probability as tfp from bokeh.models import HoverTool, LinearAxis, Span from bokeh.models.ranges import Range1d from bokeh.plotting import figure from scipy.integrate import cumtrapz from tqdm import tqdm...
PypiClean
/Booktype-1.5.tar.gz/Booktype-1.5/lib/booki/site_static/js/jquery/ui/jquery.ui.draggable.js
(function( $, undefined ) { $.widget("ui.draggable", $.ui.mouse, { widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: f...
PypiClean
/BIT_framework-0.0.2-py3-none-any.whl/BIT_DL/pytorch/modules/decoders/t5_decoder.py
import sys from typing import Optional, Union import torch from torch import nn from BIT_DL.pytorch.modules.encoders.multihead_attention import Cache from BIT_DL.pytorch.modules.pretrained.t5_utils import \ T5LayerNorm, MultiheadRPRAttention from BIT_DL.pytorch.modules.decoders.transformer_decoders import \ ...
PypiClean
/JoUtil-1.3.3-py3-none-any.whl/JoTools/txkj/fackImg.py
# 伪造的数据 左上角 有 5*5 有 F 字母的标注, # 位置不能重复,每一个位置有缓冲区域 # 支持透明和不透明 jpg 和 png 两个格式的贴图 import os import cv2 import copy import shutil import numpy as np import PIL.Image as Image from JoTools.txkjRes.deteRes import DeteRes class FakeImg(object): def __init__(self, img_path, icon_dir): # 原图路径 self.img...
PypiClean
/Netzob-2.0.0.tar.gz/Netzob-2.0.0/src/netzob/Model/Grammar/Automata.py
#+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocols | #+-...
PypiClean
/Allegra-0.63.zip/Allegra-0.63/lib/prompt.py
"http://laurentszyster.be/blog/prompt/" import sys, types def compact_traceback (exc_info=None): """return a compact traceback tuple from sys.exc_info(), like: (['error name', ('filename', 'lineno', 'function'), ... ], 'error message') ...
PypiClean
/Chips-python-2.2.3.tar.gz/Chips-python-2.2.3/chips/chipsweb/examples.py
examples = { "Fast Fourier Transform": """ /* fft.c */ /* Jonathan P Dawson */ /* 2013-12-23 */ #include <math.h> #include <stdio.h> /*globals*/ const int n = 1024; const int m = 10; double twiddle_step_real[m]; double twiddle_step_imaginary[m]; /*calculate twiddle factors and store them*/ void calculate_twiddl...
PypiClean
/Adyan_test-0.2.9-py3-none-any.whl/Adyan/Utils/H5_TK.py
import asyncio import time from pyppeteer.launcher import launch from faker import Faker from pyppeteer import launcher # launcher.DEFAULT_ARGS.remove("--enable-automation") fake = Faker() class GetTK: def __init__(self, mongo_conn): self.mongo_conn = mongo_conn async def get_content(self, url): ...
PypiClean
/Flask-Model-Management-0.1.0.tar.gz/Flask-Model-Management-0.1.0/flask_model_management/domain.py
import warnings from datetime import date from datetime import datetime from decimal import Decimal from functools import partial import attr from wtforms import DecimalField from wtforms import FloatField from wtforms import IntegerField from wtforms import StringField from wtforms.fields import DateField from wtform...
PypiClean
/Hive_ML-1.0.1.tar.gz/Hive_ML-1.0.1/Hive_ML_scripts/Hive_ML_feature_selection.py
import datetime import importlib.resources import json import os from argparse import ArgumentParser, RawTextHelpFormatter from pathlib import Path from textwrap import dedent import numpy as np import pandas as pd from Hive.utils.log_utils import ( get_logger, add_verbosity_options_to_argparser, log_lvl_...
PypiClean
/Flask-DotEnv-0.1.2.tar.gz/Flask-DotEnv-0.1.2/README.rst
Flask-DotEnv ------------ .. image:: https://travis-ci.org/grauwoelfchen/flask-dotenv.svg?branch=master :target: https://travis-ci.org/grauwoelfchen/flask-dotenv .. image:: https://img.shields.io/pypi/v/Flask-Dotenv.svg :target: https://pypi.python.org/pypi/Flask-Dotenv/ | Adds support for the ``.env`` file ...
PypiClean
/Dero-0.15.0-py3-none-any.whl/dero/latex.py
import os, datetime, filecmp, shutil, math import pandas as pd from io import StringIO from .data import replace_missing_csv def date_time_move_latex(tablename,filepath, folder_name='Tables'): r""" Takes a LaTeX tex and PDF after the PDF's been created by pdflatex and moves it into a table folder with th...
PypiClean
/LambdaTool-0.9.5.tar.gz/LambdaTool-0.9.5/lambdatool/template/service/main.py
import os import json from flask import request from zevon import FlaskLambda ''' The FlaskLambda object that is created is the entry point for the lambda. The LambdaTool deployer expects this to be called 'lambda_handler' ''' lambda_handler = FlaskLambda(__name__) @lambda_handler.route('/', methods=['GET']) def OK...
PypiClean
/AeroSandbox-4.1.1.tar.gz/AeroSandbox-4.1.1/aerosandbox/geometry/fuselage.py
import numpy as np from aerosandbox import AeroSandboxObject from aerosandbox.geometry.common import * from typing import List, Dict, Any, Union, Tuple, Optional, Callable import copy class Fuselage(AeroSandboxObject): """ Definition for a Fuselage or other slender body (pod, fuel tank, etc.). Anatomy o...
PypiClean
/GSAS-II-WONDER_linux-1.0.1.tar.gz/GSAS-II-WONDER_linux-1.0.1/GSAS-II-WONDER/GSASIIpwdGUI.py
from __future__ import division, print_function import platform import sys import os.path # Don't depend on graphics for scriptable try: import wx import wx.grid as wg except ImportError: pass import numpy as np import numpy.linalg as nl import numpy.ma as ma import math import copy import random as ran if ...
PypiClean
/Interface_KB-1.1.0.tar.gz/Interface_KB-1.1.0/Interface_KB/PerformanceFunctions.py
from .InterfaceObjects import Parameter,PerformanceModel,StopCondition,Constraint,Objective,DecisionVariable,AnalysisModel,ResultMetric,Contact,BoundaryCondition,Term,Expression #import helper functions from .HelperFunctions import * #------------------------------------------------------------------------------------...
PypiClean
/ClueDojo-1.4.3-1.tar.gz/ClueDojo-1.4.3-1/src/cluedojo/static/dojox/layout/GridContainer.js
if(!dojo._hasResource["dojox.layout.GridContainer"]){ dojo._hasResource["dojox.layout.GridContainer"]=true; dojo.provide("dojox.layout.GridContainer"); dojo.experimental("dojox.layout.GridContainer"); dojo.require("dijit._base.focus"); dojo.require("dijit._Templated"); dojo.require("dijit._Container"); dojo.require("di...
PypiClean
/Misago-0.36.1.tar.gz/Misago-0.36.1/misago/categories/admin/views/categories.py
from django.contrib import messages from django.shortcuts import redirect from django.utils.translation import gettext_lazy as _ from ... import THREADS_ROOT_NAME from ....acl.cache import clear_acl_cache from ....admin.views import generic from ....threads.threadtypes import trees_map from ...models import Category, ...
PypiClean
/EmBCI-0.1.2.tar.gz/EmBCI-0.1.2/embci/utils/ili9341_api.py
# built-ins import os import time import threading # requirements.txt: necessary: pillow # requirements.txt: data-processing: numpy # requirements.txt: drivers: spidev, gpio4 from PIL import Image, ImageDraw, ImageFont import numpy as np import spidev from gpio4 import SysfsGPIO __dir__ = os.path.dirname(os.path.absp...
PypiClean
/Flask-AppBuilder-jack-3.3.4.tar.gz/Flask-AppBuilder-jack-3.3.4/flask_appbuilder/charts/views.py
import logging from flask_babel import lazy_gettext from .jsontools import dict_to_json from .widgets import ChartWidget, DirectChartWidget from ..baseviews import BaseModelView, expose from ..models.group import DirectProcessData, GroupByProcessData from ..security.decorators import has_access from ..urltools import...
PypiClean
/GenIce-1.0.11.tar.gz/GenIce-1.0.11/genice/lattices/Struct14.py
pairs=""" 15 329 259 27 265 325 258 67 87 25 224 68 331 143 39 97 256 310 288 89 239 65 0 93 108 116 109 184 59 289 163 155 306 328 120 341 212 277 243 139 192 315 273 279 62 300 166 229 294 337 138 119 120 83 286 282 30 168 203 264 197 82 196 82 261 224 161 220 297 36 249 83 252 168 288 301 21 18 213 157 28 72 189 52 ...
PypiClean
/Kerko-1.0.0-py3-none-any.whl/kerko/specs.py
from abc import ABC, abstractmethod from collections.abc import Iterable from typing import Any, Dict, List, Optional from babel.numbers import format_decimal from flask import Request, url_for from flask_babel import get_locale from w3lib.url import safe_url_string from werkzeug.datastructures import MultiDict from w...
PypiClean
/Madengine_client_messenger-0.0.1-py3-none-any.whl/client/add_contact.py
import sys from PyQt6.QtWidgets import QDialog, QLabel, QComboBox, QPushButton from PyQt6.QtCore import Qt from logs.client_log_config import log sys.path.append('../') # Инициализация клиентского логера logger = log # Диалог выбора контакта для добавления class AddContactDialog(QDialog): def __init__(self, tra...
PypiClean
/Grid2Op-1.9.3-py3-none-any.whl/grid2op/gym_compat/multidiscrete_gym_actspace.py
import copy import warnings import numpy as np from grid2op.Action import ActionSpace from grid2op.dtypes import dt_int, dt_bool, dt_float from grid2op.gym_compat.utils import (ALL_ATTR, ATTR_DISCRETE, check_gym_version, ...
PypiClean
/BenchML-0.3.4.tar.gz/BenchML-0.3.4/benchml/logger.py
import argparse import os import subprocess import sys import time import numpy as np try: from lxml import etree except ImportError: pass boolean_dict = { "true": True, "1": True, "yes": True, "false": False, "0": False, "no": False, "none": False, } # ==========================...
PypiClean
/BaiduSpider-1.0.2.6.tar.gz/BaiduSpider-1.0.2.6/README.md
<!-- *** Thanks for checking out the Best-README-Template. If you have a suggestion *** that would make this better, please fork the repo and create a pull request *** or simply open an issue with the tag "enhancement". *** Thanks again! Now go create something AMAZING! :D --> <!-- PROJECT SHIELDS --> <!-- *** I'm u...
PypiClean
/AltAnalyze-2.1.3.15.tar.gz/AltAnalyze-2.1.3.15/altanalyze/stats_scripts/SpliceEnricher.py
import os, sys, string, getopt import math, numpy from scipy import stats import warnings import time def importFile(filename,convertToFloat=False): db={} firstRow=True dataset_max=0 for line in open(filename,'rU').xreadlines(): data = line.rstrip() t = string.split(data,'\t') u...
PypiClean
/Argonaut-0.3.4.tar.gz/Argonaut-0.3.4/argonaut/public/ckeditor/_source/plugins/link/plugin.js
/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'link', { init : function( editor ) { // Add the link and unlink buttons. editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) ); ed...
PypiClean
/Canto-curses-0.9.9.tar.gz/Canto-curses-0.9.9/canto_curses/main.py
CANTO_PROTOCOL_COMPATIBLE = 0.9 from canto_next.client import CantoClient from canto_next.plugins import try_plugins, set_program from canto_next.rwlock import alllocks from canto_next.hooks import call_hook from .config import config, finalize_eval_settings from .tagcore import tag_updater, alltagcores from .gui im...
PypiClean
/JUC-0.0.5.tar.gz/JUC-0.0.5/README.md
# JUC JUC is a simple Unicode based text crypter note: *You can find all the examples in the folder `examples`* # Installation For now this project is not on [pypi](https://pypi.org) ( pip ), so you have to install it manually by downloading the repo # Preview > ### File Encrypter > ![Gif Video](https://github.co...
PypiClean
/CosmoTech-SupplyChain-5.1.0.tar.gz/CosmoTech-SupplyChain-5.1.0/Supplychain/Generic/adt_writer.py
from Supplychain.Generic.timer import Timer import os import uuid from azure.identity import DefaultAzureCredential from azure.digitaltwins.core import DigitalTwinsClient class ADTWriter(Timer): def send_twin(self, twin: dict) -> dict: digital_twin_client = DigitalTwinsClient(os.environ["AZURE_DIGITAL_T...
PypiClean
/ConferenceCorpus-0.1.1.tar.gz/ConferenceCorpus-0.1.1/corpus/utils/download.py
import os import urllib import gzip import shutil import time class Download: ''' Utility functions for downloading data ''' @staticmethod def getURLContent(url:str): with urllib.request.urlopen(url) as urlResponse: content = urlResponse.read().decode() return c...
PypiClean
/Mikado-2.3.4.tar.gz/Mikado-2.3.4/util/class_run.py
import subprocess,sys,argparse,os import shutil import logging def main(): logging.basicConfig(format=" %(asctime)s - %(levelname)s - %(message)s", level=logging.INFO) parser=argparse.ArgumentParser("Quick utility to rewrite the wrapper for CLASS.") parser.add_argument("--clean",...
PypiClean
/CCC-2.0.1.tar.gz/CCC-2.0.1/ccc/packages/migrations/0004_setup_default_packages.py
from django.db import migrations def setup_default_packages(apps, schema_editor): """Setup the current default/productive packages on CCC""" packages = [ { "model": "packages.packagetype", "pk": 1, "fields": { "title": "Basic", "sku"...
PypiClean
/BlueWhale3-3.31.3.tar.gz/BlueWhale3-3.31.3/Orange/widgets/visualize/owradviz.py
import warnings from itertools import islice, permutations, chain from math import factorial import numpy as np import pyqtgraph as pg from AnyQt.QtCore import Qt, QRectF, QPoint, pyqtSignal as Signal from AnyQt.QtGui import QStandardItem, QColor import pyqtgraph as pg from pyqtgraph.graphicsItems.ScatterPlotItem imp...
PypiClean
/Klampt-0.9.0-cp36-cp36m-win_amd64.whl/klampt/control/blocks/utils.py
from .core import Block from klampt.math import vectorops import inspect class BlockSignal(RuntimeError): """An exception raised by a block if it wishes to raise a signal to a parent. Attributes: signal (str): the identifier of the signal """ def __init__(self,signal,text): self.s...
PypiClean
/DI_engine-0.4.9-py3-none-any.whl/ding/policy/sac.py
from typing import List, Dict, Any, Tuple, Union from collections import namedtuple import copy import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal, Independent from ding.torch_utils import Adam, to_device from ding.rl_utils import v_1step_td_dat...
PypiClean
/DevTool-0.0.2-py3-none-any.whl/devtool/utils/common.py
import datetime import os import re import time from devtool.utils.devtool_exceptions import MemoryOutOfThresException is_psutil_installed = False is_pynvml_installed = False try: import psutil is_psutil_installed = True except: pass try: import pynvml is_pynvml_installed = True except: pass...
PypiClean
/CleanAdminDjango-1.5.3.1.tar.gz/CleanAdminDjango-1.5.3.1/django/contrib/gis/gdal/geomtype.py
from django.contrib.gis.gdal.error import OGRException from django.utils import six #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', ...
PypiClean
/CDS-1.0.1.tar.gz/CDS-1.0.1/cds/modules/records/serializers/vtt.py
from __future__ import absolute_import, print_function from datetime import datetime from flask import current_app, render_template, url_for from invenio_rest.errors import FieldError, RESTValidationError from ...deposit.api import Video from ..api import CDSVideosFilesIterator class VTTSerializer(object): """...
PypiClean
/Djblets-3.3.tar.gz/Djblets-3.3/docs/releasenotes/0.7.30.rst
============================ Djblets 0.7.30 Release Notes ============================ **Release date**: June 6, 2014 Security ======== * Fixed a XSS issue in the gravatars code. Users could construct a name that would allow for injecting JavaScript in the page. That name is now properly escaped. This is :c...
PypiClean
/EggLib-3.3.0.tar.gz/EggLib-3.3.0/README.rst
.. image:: ./doc/logo/banner.png :target: https://egglib.org :alt: EggLib Logo |PythonVersions| |PypiPackage| .. contents:: Table of Contents :depth: 3 About ===== EggLib is a Python library, largely implemented in C++, for evolutionary genetics and genomics. Main features are sequence data management, se...
PypiClean
/OctoBot-Trading-2.4.23.tar.gz/OctoBot-Trading-2.4.23/octobot_trading/exchange_data/ticker/ticker_manager.py
import math import octobot_commons.logging as logging import octobot_trading.enums as enums import octobot_trading.util as util class TickerManager(util.Initializable): def __init__(self): super().__init__() self.logger = logging.get_logger(self.__class__.__name__) self.ticker = {} ...
PypiClean
/ConfigWrapper-0.4.5.tar.gz/ConfigWrapper-0.4.5/src/configwrapper/options/numeric.py
from decimal import Decimal, InvalidOperation from configwrapper import ValidationError from configwrapper.section import ConfigOption __author__ = 'Lai Tash (lai.tash@yandex.ru)' class IntOption(ConfigOption): def __init__(self, allow=None, *args, **kwargs): self.allow = allow or (lambda i: True) ...
PypiClean
/IES-SCAN-API-1.1.12.zip/IES-SCAN-API-1.1.12/README.txt
This is Python version 3.4.3 ============================ Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Python Software Foundation. All rights reserved. Python 3.x is a new version of the language, which is incompatible with the 2.x line of releases. The lang...
PypiClean
/Kr0nOs-3.4.1.tar.gz/Kr0nOs-3.4.1/kronbot/launcher.py
import argparse import asyncio import getpass import os import platform import subprocess import sys import aiohttp import pkg_resources from kronbot import MIN_PYTHON_VERSION from kronbot.core import VersionInfo, __version__ from kronbot.core import version_info as kron_version_info from kronbot.core.cli import con...
PypiClean
/NeuroUnits-0.1.2.tar.gz/NeuroUnits-0.1.2/src/neurounits/visitors/common/plot_networkx.py
import networkx as nx import matplotlib.pyplot as plt from neurounits.visitors import ASTActionerDefault from neurounits.visitors import SingleVisitPredicate from neurounits.visitors import ASTVisitorBase from neurounits.ast_builder.eqnsetbuilder_symbol_proxy import SymbolProxy from neurounits.ast import OnEventStateA...
PypiClean
/ONE-api-2.2.2.tar.gz/ONE-api-2.2.2/README.md
# Open Neurophysiology Environment [![Coverage Status](https://coveralls.io/repos/github/int-brain-lab/ONE/badge.svg?branch=main)](https://coveralls.io/github/int-brain-lab/ONE?branch=main) ![CI workflow](https://github.com/int-brain-lab/ONE/actions/workflows/main.yaml/badge.svg?branch=main) The Open Neurophysiology E...
PypiClean
/Mathics3-6.0.2.tar.gz/Mathics3-6.0.2/mathics/doc/latex_doc.py
import re from os import getenv from mathics import settings from mathics.core.evaluation import Message, Print from mathics.doc.common_doc import ( CONSOLE_RE, DL_ITEM_RE, DL_RE, END_LINE_SENTINAL, HYPERTEXT_RE, IMG_PNG_RE, IMG_RE, LATEX_RE, LIST_ITEM_RE, LIST_RE, MATHICS_R...
PypiClean